Re: [PHP] CSV output.

2008-09-09 Thread Ashley Sheridan
I'm guessing that when you are writing your values, you are writing numbers to the file and not strings. With numbers, the significant floating-point values are obviously preserved, but a number like 12.00 will be written as just 12. Try either casting the value to a string, or having PHP

[PHP] CSV output.

2008-09-08 Thread Tom Shaw
I'm outputting a bunch of numerical values for a spreadsheet to calculate total sales among other things on a client shopping cart. I'm running into problems with values that contain zeros after the decimal. If a value is 234.55 the value outputs fine to the CSV file but if the value is 234.00

Re: [PHP] CSV output.

2008-09-08 Thread Stephen Johnson
://www.thelonecoder.com continuing the struggle against bad code http://www.fortheloveofgeeks.com I¹m a geek and I¹m OK! -- From: Tom Shaw [EMAIL PROTECTED] Date: Mon, 8 Sep 2008 15:53:58 -0500 To: PHP list - not junk php-general@lists.php.net Subject: [PHP] CSV output. I'm outputting a bunch

RE: [PHP] CSV output.

2008-09-08 Thread Boyd, Todd M.
-Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 3:54 PM To: php-general@lists.php.net Subject: [PHP] CSV output. I'm outputting a bunch of numerical values for a spreadsheet to calculate total sales among other things on a client

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
] Sent: Monday, September 08, 2008 3:59 PM To: Tom Shaw; php-general@lists.php.net Subject: RE: [PHP] CSV output. -Original Message- From: Tom Shaw [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 3:54 PM To: php-general@lists.php.net Subject: [PHP] CSV output. I'm

Re: [PHP] CSV output.

2008-09-08 Thread Eric Gorr
On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up when I try to manually add a .00. I know weird. Did you mean to say that it .00 _doesn't_ show up when you try to manually add a .00? The value is in the array or string

Re: [PHP] CSV output.

2008-09-08 Thread Wolf
Tom Shaw wrote: I'm outputting a bunch of numerical values for a spreadsheet to calculate total sales among other things on a client shopping cart. I'm running into problems with values that contain zeros after the decimal. If a value is 234.55 the value outputs fine to the CSV file but if the

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
wrong. -Original Message- From: Eric Gorr [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 4:21 PM To: PHP General Subject: Re: [PHP] CSV output. On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up when I try

Re: [PHP] CSV output.

2008-09-08 Thread Micah Gersten
Subject: Re: [PHP] CSV output. On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up when I try to manually add a .00. I know weird. Did you mean to say that it .00 _doesn't_ show up when you try to manually add

Re: [PHP] CSV output.

2008-09-08 Thread Jim Lucas
, 2008 4:21 PM To: PHP General Subject: Re: [PHP] CSV output. On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up when I try to manually add a .00. I know weird. Did you mean to say that it .00 _doesn't_ show up when you try

Re: [PHP] CSV output.

2008-09-08 Thread Eric Gorr
$out; This prints wrong. -Original Message- From: Eric Gorr [mailto:[EMAIL PROTECTED] Sent: Monday, September 08, 2008 4:21 PM To: PHP General Subject: Re: [PHP] CSV output. On Sep 8, 2008, at 5:06 PM, Tom Shaw wrote: Actually that won't work I tried it. For some reason the .00 shows up

[PHP] CSV output displayed in Excel or similar.

2001-11-29 Thread Matthew Clark
I have a PHP script that outputs several lines of comma separated values.. I would like to display this output in Excel without having to write the output to a file with a .csv extension and redirecting. I have tried setting the content-type: application/vnd.ms-excel and Excel isn't happy.. it