4 ms·
As usual, I think it's a lot more nuanced than that. An option was added last year [0] the way you propose it, but until then users already had the option to m
by makeitdouble 3y ago
As usual, I think it's a lot more nuanced than that.
An option was added last year [0] the way you propose it, but until then users already had the option to mark the columns as text. The same way we have to deal with any data where auto detection might be problematic: explicitely set a type, and potentially a format.
But of course that's bothersome, sometime people forget to do it, sometimes they don't even know how to properly do it etc. And some of these people will still probably forget to set the option, and there are still edge cases where it can fail (macros are cited)
[0] https://www.theverge.com/2023/10/21/23926585/microsoft-excel-misreading-dates-human-genes-conversion-fixed https://www.theverge.com/2023/10/21/23926585/microsoft-excel...
- DonsDiscountGas 3y ago> but until then users already had the option to mark the columns as text This only works on Excel files though, which save a type for columns/cells. With CSV files, Excel would just auto-format them. I guess you could save everything as xls/xlsx, but I shouldn't have to use a vendors file format because they're threatening to corrupt my data if I don't.
- SAI_Peregrinus 3y agoThat's just CSV being unusable shit. There's always a schema for the types of the fields, but there's no way to communicate that schema, so CSV is inherently ambiguous. If your data includes fancy things like numbers you should avoid CSV.
- WorldMaker 3y agoIt's still a shame that Excel's JSON support is so good, but no business user trusts it because "you can't double click the files" and CSV remains the worst best thing you can double click. I don't want Excel to take over the file association for .json but I do sometimes wish Excel would just invent a file extension like .xljson that loads JSON so that at least you could trivially rename a JSON file to .xljson and get working double-click for your business users but a file format (with optional schema support even) that's a more modern and saner de facto standard than CSV. I think that one dumb trick would improve everyone's productivity a great deal.
- imtringued 3y agoYou're talking about users of an operating system that hides file extensions by default.
- WorldMaker 3y agoNo, I'm talking about developing for those users. Right now if you want to write the simplest, dependency lightest export code that those users can double-click and open in Excel you are writing yet another CSV export. It would be nice if instead you could take an existing API that returns JSON and wrap it in a mimetype like application/json+excel, and add a Content-Disposition: attachment; filename=thisapi.xljson and get Excel double-click support without another flaky CSV file.
- imtringued 3y agoCSV doesn't do what you want and excel doesn't support CSV files. Why insist on a completely wrong tool and file format combination? If the excel developers cared about CSV support they would have added more settings to the CSV import tool that let you specify everything. Every single data base tool that lets you import CSV files has worked better than Excel. It simply means Excel wasn't built to import CSV files. Tough luck. .xlsx file extension is well supported by many open source libraries. If you insist on working with Excel then you should use the appropriate file format, which is .xlsx. I do that all the time and it just works.