dilshod / xlsx2csv

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

potential invalid date format #268

Open cos2000 opened 1 year ago

cos2000 commented 1 year ago

Hi there,

I have an XLSX file with a text column. In this column sometimes the value "#nv" occurs. When trying to convert this file, I got the error "wrong Float format" in the old version. In the current version (0.8.1) I get the error "potential invalid date format".

If I remove the entries with the value "#nv" then everything works. What can I do?

with kind regards

dilshod commented 1 year ago

Can you provide a sample file?

cos2000 commented 1 year ago

Yeah i have a testdocument. Only one column. On Line 9 there is a "#nv" as value! When you try to convert, it will run until line 9 and give the error "potential invalid date format"

own.xlsx

dilshod commented 1 year ago

Thanks! I've added handling #N/A values.

cos2000 commented 1 year ago

Thanks a lot. Is there coming a new version?

cos2000 commented 1 year ago

Ive tested your fix, but now lines that has any #nv value will be ignored. Thats not nice, because when the line has other data i need, its not cool, wenn a complete line will ignoren when one field contains a #nv value!

It will be better to export the line - just export #nv als #nv.

The CSV of my sample file should look like:

43025712 43025713 43025714 43025715 43025716 43025717 43025718

NV

if #nv is in a text defined field, then #nv is an allowed value. Just skip is not the right way.

can you change this please? i need all data of my csv

i provided a new sample file. 2 cols - the line with "swan" as animal hast a number that ist #nv - the complete line is ignored! I need all lines!

Thank you

own.xlsx

dilshod commented 1 year ago

it looks good to me: own.csv

cos2000 commented 1 year ago

ok i have cloned the git to make it runable on my server. In my case the line with the #na value is skipped! is there a parameter to tell the program not to skip these lines?

BeheSQ commented 3 months ago

hi @dilshod I ran into similar problem but with #NAME? value of a date cell. (well, long story, its imported from Excel macro into Google Sheets). would it be possible to ignore this value also?

or, better, just to add a switch to ignore those errors and output the original value, I can handle it from there.

thanks a lot!