<?php
// include the export_spreadsheet_class
require_once ("export_spreadsheets_class.php");
// create an instance of the export_spreadsheet_class object
$myExportSimple = new exportSpreadsheets();
// set instance properties
$myExportSimple->mysqlServer = "localhost";
$myExportSimple->mysqlUsername = "exportUser";
$myExportSimple->mysqlPassword = "exportPassword";
$myExportSimple->mysqlDatabaseName = "export_spreadsheets";
$myExportSimple->mysqlTableName = "export_table";
// create an empty array of worksheets
// passing an empty array will cause the class to create a single worksheet
// containing all fields. The column titles will be the field names.
// The worksheet rows will be listed in the order they are listed in the database table
$simple_workbook_array = "";
// assign a name for the Excel spreadsheet
$simple_workbook_name = "simple.xls";
// export the spreadsheet
$myExportSimple->export_spreadsheets($simple_workbook_name,$simple_workbook_array);
?>
|