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: [EMAIL PROTECTED] phone: 888.230.7557 -----Original Message----- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Friday, February 06, 2004 2:40 PM To: [EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php