XML Excel Exporter
Recent ActivityXSpreadsheet dies after outputting the spreadsheet now, preventing corruption
-Working Corpus now in Source Folder
-`Scripts` folder added, includes database dump batch, and README.md HTML viewer
-`Local` folder added, for testing use with local database connections, etc
-Finally! Created an initial README.md
-TODO moved from includes folder into root
This simple class allows you via PHP to export an XML Spreadsheet compatible with all versions of Excel 2003 and up.
The files generated will work with versions of Office 2003 and up. It is considered production safe, and is currently in use in a fair number of production sites.
Unlike CSV or HTML Table exports, you can have multiple worksheets of data! A sheets data can be added to the spreadsheet either by a MySQL query resource or as a 2 dimensional array.
- Office 2007/2010 bark about XLS file extensions despite refusing to open XML file extensions downloaded from the internet. (Anyone know a solution?)
- DOMDocument incorrectly converts/removes non-printable/low range characters (eg: ).
- File Format is not supported by:
- Open Office
- Google Documents
- Microsoft Office Live
require('includes/classes/XSpreadsheet.php'); $spread = new XSpreadsheet($fname) $spread->AddWorksheet('Products', mysql_query("Select * From products")) ->AddWorksheet('Categories', mysql_query("Select * From categories")) ->Generate()->Send();
require('includes/classes/XSpreadsheet.php'); $data = array( array( 'Column 1', 'Column 2', 'Column 3' ), array( 1, 2, 3 ), ); $spread = new XSpreadsheet($fname) $spread->AddWorksheet('Awesome Sheet', $data ) ->Generate()->Send();