And of course I bet you want to be exportable so that someone can save the excel document it generates huh? If that is the case, you just need to do three things...
1) You need to set the "Content-Type" for the page to "application/vnd.ms-excel"
2) You need to add the header "Content-Disposition: inline; filename=nameoffilegoeshere.xls" (Do remember the rule about headers, send no data before you use header() or else you will get an error)
3) Write the content of the mysql records as you would an html table. The HTML and table cells will go straight into excel forming a table.
The rest should be cake.
Hope this has helped you. Enjoy!
"At DIC we be content exporting to excel code ninjas! Excel has nothing on us."
This post has been edited by Martyr2: 18 Jan, 2008 - 01:45 PM