asafdav / ng-csv

Simple directive that turns arrays and objects into downloadable CSV files
MIT License
573 stars 215 forks source link

Field with leading zeros being treated as a number rather than a string #222

Open ThomasSmithIRE opened 6 years ago

ThomasSmithIRE commented 6 years ago

I am using a String field to store Identification Numbers. When exporting the data to CSV, all leading zeros are removed. Is my String being treated as a Number during the conversion?

I cannot wrap the values in quotes as there are many other dependencies on these values in the system.

Can you suggest the best approach to this one?

rohithshenoyg commented 6 years ago

I have the same issue as well. Please help with an example.