You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I know, by CSV standard you may enclose fields even if there is no real or obvious need.
In my case I'm dealing with a field for a German 5-digits postal code that may start with a zero (e.g. "01234"), but must always be interpreted as a string. Importing the CSV file with software such as Excel, the value is interpreted as number (1234) if it's not enclosed.
I tried a CallbackCollection and cast all values to string, but that didn't make any difference.
I could add a whitespace to numeric values, but then the CSV data contains whitespaces, which isn't great either.
Is there an option to force enclosing a field? Or at least a better trick than adding a whitespace?
The text was updated successfully, but these errors were encountered:
Because I needed a quick and dirty solution I had to implement the CSV export myself. So I'm alright for now. If goodby/csv doesn't support force-enclosing values, I hereby suggest this as a new feature for a future version. Thanks!
As far as I know, by CSV standard you may enclose fields even if there is no real or obvious need.
In my case I'm dealing with a field for a German 5-digits postal code that may start with a zero (e.g. "01234"), but must always be interpreted as a string. Importing the CSV file with software such as Excel, the value is interpreted as number (1234) if it's not enclosed.
I tried a
CallbackCollection
and cast all values tostring
, but that didn't make any difference.I could add a whitespace to numeric values, but then the CSV data contains whitespaces, which isn't great either.
Is there an option to force enclosing a field? Or at least a better trick than adding a whitespace?
The text was updated successfully, but these errors were encountered: