News for hackers. Stuff that matters.
Re:Dangers of CSV Injection by viraptor on Tuesday October 10, 2017 @12:51AM (#15439441)
> CSVs to show properly in Excel we have to mess around with OS language settings.

Why? Aren't the import settings enough?

https://support.office.com/en-us/article/Text-Import-Wizard-...

Re:Dangers of CSV Injection by kristofferR on Tuesday October 10, 2017 @01:00AM (#15439478)
That copies the data from the CSV file into a worksheet, you aren't editing the CSV file anymore.

I'm not just being pedantic, it makes a big difference. If I want to change some values in a spreadsheet I should be able to just open it, change the values, save, and be certain that the document will be identical apart from the deliberate changes. This is especially important for CSV files, which are commonly used for import/export operations.

Re:Dangers of CSV Injection by viraptor on Tuesday October 10, 2017 @01:18AM (#15439539)
I think I understand your use case, but in that case aren't there better apps for that? Excel is not a CSV editor. Even if they would look very similar...
Re:Dangers of CSV Injection by letlambda on Tuesday October 10, 2017 @02:40AM (#15439849)
If you open a .csv file in excel and save it, you may find that it has converted any long numbers into scientific notation for you, and saved that as text. It will also get rid of any leading zeros for you.
Re:Dangers of CSV Injection by mulmen on Tuesday October 10, 2017 @03:15AM (#15439946)
Also it will round those numbers silently to 15 digits.

It was a fun time explaining to accounting why their report showed duplicate billing events. Try telling an accountant "Don't use Excel". The solution of course was to prefix a "'" character, making the file useless outside of spreadsheet programs.

Re:Dangers of CSV Injection by mulmen on Tuesday October 10, 2017 @03:19AM (#15439954)
This is the classic response of the Excelista. "You're holding it wrong". Yeah well Excel is a hammer with two claws and no handle, there's no right way to hold it.

If Excel isn't for opening CSV files why does it associate itself with that extension by default? Why does it implicitly convert the CSV file to a half-assed Excel workbook? Why is there no option to change this behavior?

Re:Dangers of CSV Injection by viraptor on Tuesday October 10, 2017 @07:49AM (#15440988)
I haven't used excel in years, so your rant is a bit misdirected. There's a simple reason why it associates that way - it can open CSV files. Same as notepad associates to things which it's useless for. (but if you don't have anything else, it will work)

I'm just saying that editing CSVs regularly, preserving the formatting, while avoiding the import/export functionality is a very specific use case. It's likely not something excel project managers care about that much either. If the use case is popular, then there's going to be an editor that does it better. If not... tough.

Re:Dangers of CSV Injection by mulmen on Tuesday October 10, 2017 @08:11AM (#15441109)
Sorry, I didn't intend that rant to be directed toward you specifically. I just mean that your comment sounds like something those Excel project managers would tell me and I'm tired of hearing it.

After years of hearing "that's not what Excel is for" I am left wondering what it is for. I have asked many "Excel pros" how to solve some problem in Excel and I honestly can't think of any satisfactory answers. Just "that's not a common use case".

The CSV behavior is just one of the annoyances. Conflating display format with data type is another. Silently changing data is another. My list of gripes with Excel is long and on this topic my fuse is short.

Re:Dangers of CSV Injection by mark-r on Tuesday October 10, 2017 @11:27AM (#15442590)
My experience is that Excel is the Swiss Army Knife application, sufficing to do almost any job even if it's not the best choice. Being installed on almost every desktop means it becomes the first choice tool for almost any task.
Re:Dangers of CSV Injection by kristofferR on Tuesday October 10, 2017 @02:11AM (#15439742)
Not really. I've found TableTool [1], but it's incredibly basic (doesn't even support sorting columns or search/replace).

[1] https://github.com/jakob/TableTool