Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rather than open it directly in Excel, open a blank workbook and use the data import functionality. This lets you specify the type of each column.

Its not a perfect solution, but its a passable work-around.



This works when you have control of the data.

The real problem arises when you ask someone to send you data in CSV format. If, in between exporting it from their database and sending it to you, they happened to open and save it in Excel, you will get corrupted data. Usually the sender is blissfully unaware of what Excel's automatic type conversion does to their data.

CSV has been made unreliable as a format for data exchange between companies (aka EDI) largely because Microsoft decided that CSV files should always be opened in Excel by default in Windows. At the very least they should turn automatic type conversion off for CSVs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: