Re: [PHP] Spreadsheet_Excel_Reader problem

[email protected] (Jochen Schultz)
Newsgroups php.general
Message-ID <[email protected]>
AFAIK, there is no real standard out there for CSV file definition and 
since Microsoft and many others (me too btw) use other chars for field 
separation in so called CSV files, i think it is a good way to deal with 
it and let it be how it is (actually i have to look into every CSV file 
that is going to be exchanged and that has some advantages as well).

Btw. who told you to use tripple quotes?

http://www.rfc-editor.org/rfc/rfc4180.txt

    7.  If double-quotes are used to enclose fields, then a double-quote
        appearing inside a field must be escaped by preceding it with
        another double quote.  For example:

        "aaa","b""bb","ccc"

regards
Jochen

Ashley Sheridan schrieb:
> On Thu, 2010-03-18 at 12:56 +0100, Jochen Schultz wrote:
>> > Microsoft managed to basterdise this format
>>  > a bit as well, and lets you use tabs, spaces and all sorts of other
>>  > characters to delimit data fields. Someone obviously didn't mention to
>>  > them that the file type is 'comma separated values'!
>>
>> Or maybe it is because someone told them, that there is data out there, 
>> that might contain commas?
>>
>> regards
>> Jochen
> 
> The csv format allows for quote marks which can serve to escape commas:
> 
> "data, with commas"
> 
> And for escaping quote marks, you just use triple quote marks:
> 
> "some text """with quotes""" "
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.