Reputation: 339
When I open a csv file in excel, it break up the lines longer than 32760 characters, put the rest on the next line, and delete at least 2 characters in the process.
There is no special characters at the break up place.
Is it a normal behaviour? Where does it come from? Can I change that in any way?
Thanks for help.
Upvotes: 3
Views: 4116
Reputation: 12184
Excel has limit for cell length as you described, but it is OK, because Excel has never supposed to be a CSV editor.
I strongly recommend to never use Excel for CSV files. Reason:
It will change CSV values like 0053 into 53 without warning you. This can have serious impact on your data, because especially in ERP systems, values like 0053 are common and leading zeros are often meaningful. Or just think about ZIP codes: You can find ZIP 040 12 converted by Excel into 4012 without warning you. Excel also introduces other unexpected behaviors (from CSV viewpoint) like the one you described in the question.
Use some dedicated CSV editors instead. Some of them are freeware. This will also resolve your problem with cell length and also other potential problems like problems with quotes, with line breaks inside the cells, with character encoding, with column headers etc.
Upvotes: 4