3 ms·
Yes, this is so horrible. As a workaround I sometimes put "sep=," on the first line of the spreadsheet. This forces Excel to use the comma as a separator, regar
by jsproc 10y ago
Yes, this is so horrible.
As a workaround I sometimes put "sep=," on the first line of the spreadsheet. This forces Excel to use the comma as a separator, regardless of the locale.
The downside of course is that every other tool on the planet shows the extra row, so it's not very useful.
- ptman 10y agoI suffer from the reverse problem. I need to ingest CSV files produced by excel in various locales. Or is there some generally available alternative to excel that would produce valid RFC CSVs?
- Piskvorrr 10y agoThere is no such thing as a valid CSV - even the spec is borked, and nobody follows it anyway. If you have a choice, XLSX is a lesser evil.
- Freak_NL 10y agoRFC 4180¹ has been in existence since 2005 and seems perfectly straight forward. The basic syntax is two pages of very understandable text. I hold that to be the definition of valid CSV. CSV libraries tend to adhere to it (and often support additional options encountered in the wild as well); e.g., Apache Commons CSV². 1: https://tools.ietf.org/html/rfc4180 https://tools.ietf.org/html/rfc4180 2: https://commons.apache.org/proper/commons-csv/ https://commons.apache.org/proper/commons-csv/
- supergreg 10y agoIs there a way to report a bug to excel asking for proper RFC 4180 support?
- Freak_NL 10y agoProbably, but what will it achieve realistically? This (both what OP reports and this locale-dependent behaviour) is likely a WONTFIX type of bug, as there are workarounds (don't double-click to open normal CSV if you are in a locale where different delimiters are used, use import; don't start your CSV files with "ID"; etc.).
- Piskvorrr 10y agoSeems is the correct word here. Alas, it's one of multiple attempts at standardization ("I hold it" - good thing about standards is there's so many to choose from, as this RFC acknowledges), ignores charset altogether (a flaw of CSV, not of standard), and anything touched by MSO is unlikely to fit this. So, while useful for emitting CSV, no use at all for processing.