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 auto-cast

Re: [PHP] CSV output.

2008-09-08 Thread Eric Gorr
("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=inventory_report.csv"); print $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: [PH

Re: [PHP] CSV output.

2008-09-08 Thread Jim Lucas
on: attachment; filename=inventory_report.csv"); > > print $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. > > &g

Re: [PHP] CSV output.

2008-09-08 Thread Micah Gersten
inventory_report.csv"); > > print $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

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
l"); header("Content-Disposition: attachment; filename=inventory_report.csv"); print $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, 200

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

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 be

RE: [PHP] CSV output.

2008-09-08 Thread Tom Shaw
ECTED] 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]

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 clie

Re: [PHP] CSV output.

2008-09-08 Thread Stephen Johnson
It sounds like you simply need to number format the data to ensure that PHP does not truncate http://php.net/number_format If excel, or whatever your using to view the csv file, is truncating then you will need to properly format that cell. -- Stephen Johnson c | eh The Lone Coder http://www