Msg#: 4294035 posted 6:13 am on Apr 8, 2011 (gmt 0)
Hi all, At my workstation we have a mysql database containing customers payment information. My boss has just asked me to write a PHP application that can get data from this database and point the business analysts to save or download query results from the database in an excel format, either Excel 2003 or 2007. I have never done this task before. Searching on the web i found a tutorial that says this could be possible using a PEAR package SpreadSheetExcelWriter but generating only Excel version 5 (version of 1993), which means this PEAR version cannot help me.
Has someone done this task in the past or just point me to a good tutorial?
Dear Matthew1980, thank you so much. The link you gave me contains code that works fine. However, if you remember the code, it has a series of php native functions that are throwing errors in the generated excel file, those are array_values() and implode(). This first one was saying that the first parameter is expected to be an array and a NULL value was passed to it. This was a simple warning because i saw the excel file generated from the database. Is there any other way to format the headers (comming from the database table) to something more readable by humans, and not just the table columns?