4 ms·
>Excel destroys any csv file upon saving. This isn't exactly true, although I understand why people think it is. The problem is that when you "open" a csv file
by slm_HN 12y ago
>Excel destroys any csv file upon saving.
This isn't exactly true, although I understand why people think it is. The problem is that when you "open" a csv file in Excel it guesses what type the fields are and sets that datatype for the column. This will frequently mangle the data when written back to a file as you noted.
However you can "import" the csv file using the wizard and that allows you to set all of the options, including datatype. Setting this to 'text' seems to prevent Excel from mangling the data.
I tend to use a combination of CSVKit, which seems plenty fast for my usage, and Excel when dealing with csv files.
- UnoriginalGuy 12y agoMaybe there is some hidden wizard (although I've never seen it) but the fact remains that the default behaviour on a Windows machine with Office, is when you double click a CSV Excel opens it, and when you hit save Excel mangles it. Sure, you can go through and fix every single column one by one to fix it, but defaults matter. And in this case the default Excel behaviour is horrifyingly bad.
- mcintyre1994 12y agoI haven't used Excel for this in a while but as I recall the "hidden wizard" is basically file -> import from Excel itself. That said I agree that the double click behavior is pretty rubbish.