dilshod / xlsx2csv

Convert xslx to csv, it is fast, and works for huge xlsx files
MIT License
1.68k stars 301 forks source link

Trailing zeros truncated #56

Open bvds opened 10 years ago

bvds commented 10 years ago

If a cell contains something like "21.10", xlsx2csv interprets it as a number and truncates the zero. This is bad if the cell is intended to represent a version number or something like that. These cells are formatted as numbers in Excel, with a fixed number of digits after the decimal point. I have hundreds of files, so I can't change the formats by hand.

The best fix would be to simply retain leading and trailing zeros in the csv.

Another fix would be to interpret numbers with trailing or leading zeros as strings. (maybe with a flag)

Another fix would be a flag to treat all cells as strings, rather than numbers.

dilshod commented 10 years ago

Can you send me a sample file?