RE: [PHP] PHP, Excel, and tab delimited files question
| From: | jon roig | Date: | Fri, 06 Feb 2004 21:43:59 +0000 |
| Subject: | RE: [PHP] PHP, Excel, and tab delimited files question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177051@lists.php.net to get a copy of this message | ||
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
-- jon
-------------------
jon roig
web developer
email: jon@trafficdesigns.com
phone: 888.230.7557
-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard@niicommunications.com]
Sent: Friday, February 06, 2004 2:40 PM
To: php-general@lists.php.net
Subject: [PHP] PHP, Excel, and tab delimited files question
In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: inline; filename=\"excel.xls\"");
header("Expires: 0");
header("Cache-Control: must-revalidate post-check=0 pre-check=0");
However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?
TIA!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004