max-mapper / csv-spectrum

A variety of CSV files to serve as an acid test for CSV parsing libraries
140 stars 31 forks source link

Testing Excel CSV quirks #18

Open AlphaDeltaAlpha opened 7 years ago

AlphaDeltaAlpha commented 7 years ago

Excel has numerous quirks with regards to CSV generation and reading. For example, if a CSV file starts with "ID" excel treats it as SYLK: https://support.microsoft.com/en-us/kb/323626

The prescribed workaround is to preface the ID with single quotes. Should there be a test of this condition?

More generally, is the goal for RFC4180 compliance or Excel compliance?

riegel commented 3 weeks ago

I'd like to up this issue.

I am particularly looking to build an Excel generated CSV parser. So I am curious how your suite of CSV files were generated.

It would be helpful to start with the JSON data and enter it into Excel then Export from Excel noting the particular version of Excel and how it decides to create the CSV.

This seems to me to be the best way to get better Excel CSV compatability.