Hacker News new | ask | show | jobs
by XlA5vEKsMISoIln 639 days ago
Excel chews up CSVs that it opens. I know this because an accountant checked each file our code produced using Excel before trying to import it into another program. We proofread our code before we realizing the problem was somewhere else. Shoulder-surfed the process, found the giant bug with a green X on it.
2 comments

It's no better at exporting to CSV. I wrote a CSV parser a few years ago that had one set of logic for Excel CSVs and a completely different set for everything else.
Excel doesn't change CSV files when it imports them. If the imported file was being changed then the user was saving back to the same file they imported from.
This information doesn't help anyone.

The fact is the person was double-clicking a file in a list to view its contents and Excel was trampling it. Nobody in their right mind will waste time to open Excel first, use import feature, re-navigate to the file they were already looking at, and go through the import dialog just to see what's inside.

Trampling it to me implies that Excel was somehow modifying the contents of the file. Which it doesn't do by double clicking on the file and just viewing it. Do you mean that the data shown in Excel wasn't what was expected because of the auto data conversion?
Believe me, I was blown away just the same. And it's not like the accountant clicked a save button of a on-close dialog, no. Opening a CSV file was enough.
I first used Excel on Windows 3.1 and over the decades since have opened countless CSV files with it. I have never observed this behavior.