PHP : Dead Easy Excel Export
July 9th, 2008Read More excel, php
Some people like their excel files. For people who want their data exported in an excel format checkout this chunk of code. It's really easy
First of all you need to download this php excel class
Now try this code:
PHP:
-
$output[] = $q;
-
}
-
require_once "excel.php";
-
$export_file = "xlsfile://export.xls";
-
{
-
}
-
exit;
That's got to be the easiest thing you have ever done in PHP. Thanks goes to the excellent PHP Classes site.
Here is some further reading:
PHP Excel Formula Parser
PHP Excel Export class
Export data directly to Excel by configuring the MIME Type Profile Option
Power your PHP Business Logic with Excel
Reading/Parsing Excel Spreadsheet using PHP

July 14th, 2008 at 9:42 am
Note - on a unix/linux host this code might not work
to fix this try the following.
line 71 of the excel class