5 ms·
Really what this comes down to is that the CSV "standard" is in actuality an undocumented standard with one reference implementation - Excel. If it works in Exc
by ryanbrunner 9y ago
Really what this comes down to is that the CSV "standard" is in actuality an undocumented standard with one reference implementation - Excel. If it works in Excel, it's valid CSV, if it doesn't, then it's not. It's a sad state of affairs, and probably one reason to avoid working with CSV unless absolutely necessary, but there's no getting around that fact.
- emodendroket 9y agoThe main reason you'd choose CSV is precisely that you can open it in Excel.
- rjbwork 9y agoI use CSV (really tsv) because big data tools can open them extremely easily, because they're human readable, and because they're easy for my software stack to parse and use. I do most of my data processing for local consumption on a repl-like tool. We have a defined configuration for TSV we use internally that is lossless in terms of storing and extracting a number of complex data types. Embedded JSON with embedded separators in that JSON? No problem.
- tinus_hn 9y agoOriginally the xls format was the only open format in the office family and it was actually much easier to create xls files than to deal with the stupidity of csv
- emodendroket 9y agoThey're all open now, but the spec is monstrously large and difficult to work with. Definitely not easier to do than CSV.
- tinus_hn 9y ago.xlsx is not .xls
- emodendroket 9y agoIsn't xls a binary format? I can't imagine that's more pleasant to work in.
- tinus_hn 9y agoI take a defined format like .xls over an unspecified de facto ‘standard’ like .csv anytime. In many locales .csv files don’t even contain comma separated values because the comma is the decimal symbol already. It’s a mess, half of the time Microsoft can’t make it work either even when you only use their software.
- emodendroket 9y agoYou can use sep for that.
- DataWorker 9y agoThis is so wrong it’s hard to figure out where to start. Excel doesn’t make proper CSVs and it’s not a reference for anything. I can change the extension of an html file to CSV and open it in excel, it’s still an html file.
- cwyers 9y agoExcel is certainly a reference for what your end-users expect your software to be able to do.
- ryanbrunner 9y agoExcel makes proper CSVs insofar as when you say that you allow people to import CSV files into your application, the vast vast majority will be using Excel to create / manipulate those CSV files (and if they don't, whatever tool they DO use will have made efforts to work consistently with Excel). What any other spec actually says is irrelevant. For most non-technical users, anything Excel outputs as a CSV is a CSV file (and anything you output that doesn't work with Excel is not)