theres an easy way if its a simple data table type spreadsheet your after, this works 
like a treat, at the top of your page that produces the data put - 

header("Content-Type: application/");
header("Content-Disposition: attachment; filename=\"file.xls\"");

remember that your sending headers here so they have to be the very first thing to be 
sent at the start of the page.

formatting will be maintained and it will basically produce whatever the table / s 
looked like in the html page, just like if you did a copy and paste from the web to 

-----Original Message-----
From: Christine Clerc [mailto:[EMAIL PROTECTED]
Sent: 02 February 2004 10:03
To: PHP DB list
Subject: [PHP-DB] From MySQL to EXCEL

I need to turn data extracted from MySQL into an EXCEL spreadsheet 
(.xls, not a .txt that is imported into Excel).

Is it possible ?

Thank you.

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to