RE: [PHP-DB] exporting data to excel
| From: | Galbreath, Mark A | Date: | Thu, 25 Mar 2004 13:11:56 +0000 |
| Subject: | RE: [PHP-DB] exporting data to excel | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-33644@lists.php.net to get a copy of this message | ||
heh heh - last week I attempted to print the Manual...didn't realize the
sucker is 2500 pages long until the printer ran out of paper...and the
buffer overflowed.
Mark
-----Original Message-----
From: jeffrey_n_Dyke@Keane.com [mailto:jeffrey_n_Dyke@Keane.com]
Sent: Thursday, March 25, 2004 7:54 AM
To: Galbreath, Mark A
Cc: 'php-db@lists.php.net'
Subject: RE: [PHP-DB] exporting data to excel
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
_______________________
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php