dilshod / xlsx2csv

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

customize locale specific date format #189

Open arbruijn opened 4 years ago

arbruijn commented 4 years ago

There's a strange quirk in the xlsx format where values with standard format id 14 use a locale specific date format. Currently xlsx2csv hardcodes this format to the US mm-dd-yy date format, which causes confusion in e.g. dd-mm-yyyy EU locales. I know you can globally override the date format, but that breaks cells in the same file that only have a time and use a specific format for that.

Would it be possible to add an option to override the date format only for standard format 14? I can try to create a patch myself if this is an acceptable solution.

Same issue in SheetJS: https://github.com/SheetJS/sheetjs/issues/326

dilshod commented 4 years ago

I could look into this if you could send sample file

arbruijn commented 4 years ago

Thank you. Excel file: localdate.xlsx Excel display with system locale set to NL: localedate_nl Excel display with system locale set to US: localedate_us Output of xlsx2csv: ABC123,05-06-19,09:10,10:40,5