Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Leading Zero escape when CSV opened with Excel #126

Open
CharmsStyler opened this issue Jul 7, 2016 · 3 comments
Open

Leading Zero escape when CSV opened with Excel #126

CharmsStyler opened this issue Jul 7, 2016 · 3 comments

Comments

@CharmsStyler
Copy link

e.g. when writingString 0000000013. While Text Editor suggests exact text.. opening with excel drops leading zeros.. The only neat escape seems to be as follows... Does Jackson csv has a feature option to escape leading zero ?

http://stackoverflow.com/questions/165042/stop-excel-from-automatically-converting-certain-text-values-to-dates/15107122#15107122
(\t, ASCII 9).

@cowtowncoder
Copy link
Member

There is no such setting at this point. Adding a feature (CsvGenerator.Feature most likely?) would seem to make sense.

So: if String starts with '0', quote it? (in addition to other checks)

@cowtowncoder
Copy link
Member

Actually, I am not 100% sure what is being asked. Perhaps it is to allow (and drop) leading zeroes for when parsing numbers?

@cowtowncoder
Copy link
Member

FWIW looks like leading zeroes are accepted and handled so that can't be it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants