RE: [PHP-DB] exporting data to excel
| From: | jeffrey_n_Dyke at Keane dot com | Date: | Thu, 25 Mar 2004 12:45:16 +0000 |
| Subject: | RE: [PHP-DB] exporting data to excel | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33640@lists.php.net to get a copy of this message | ||
Do you set the content-type in the response header like in JSP and
servlets?
I've been reading the PHP Manual; where do you find stuff like this?
________________
take a look at the header function
http://php.net/header
an example...ymmv
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$filename" );
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");
If you want to generate excel files with more features, take a look on
phpclasses.org.
There is a PHP port of the Perl Module SpreadsheetWriteExcell...
HTH
Jeff
_______________________