I have had success using tab delimted files instead of comma delimited
files.  For some reason Excel does not behave as expected when opening csv
files from the web.  At least, it acts differently than it does when opening
them from the local disk.  At any rate, I use tabs to delimit fields and new
lines to delimit rows and it opens in Excel as expected, with one exception.
All numbers are treated as numbers even if they are enclosed in qoutes.  The
result it that "0009" is rendered as 9 in Excel.  Again, this does not
happen if the file is first saved, because Excel asks how to treat the
fields.

Fred

Matthew Clark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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 complains that it can't open the file and on the odd
chance
> that I do get it working, it doesn't read the file as csv..
>
> anyone know what's going wrong here??
>
> Incidentally, if I do save the info down to a .csv and open it, it works
> just fine.. but then I have a temporary file issue :-(
>
> Regards,
>
> Matthew Clark.
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to