Hacker News new | ask | show | jobs
by Risord 681 days ago
Excel does not support any delimeter natively since its region dependent.

I ended up saving my mental heath by supporting two different formats: "RFC csv" and "Excel csv". On excel you can for example use sep=# hint on beginning of file to get delimeter work consistently. Sep annotation obviously break parsing for every other csv parser but thats why there is other format.

Also there might be other reasons too to mess up with file to get it open correctly on excel. Like date formats or adding BOM to get it recognized as utf-8 etc. (Not quite sure was BOM case with excel or was it on some other software we used to work with )

1 comments

I also use sep= annotation. That is not documented ANYWHERE by Microsoft I assume one of the devs mentioned this in a mailing-list sometime in the nineties and it has found its way around.

Still... Shame on Microsoft of not documenting this and perhaps other annotations that one can use for ex El.