brechtsanders / xlsxio

XLSX I/O - C library for reading and writing .xlsx files
MIT License
421 stars 112 forks source link

xlsxio_xlsx2csv not working on Chorus PRO XLSX files #127

Closed eblanpain closed 2 months ago

eblanpain commented 6 months ago

I am a user of xlsxio_xlsx2csv which I like for its simplicity.

I use it for extracting .XLS files from a XLS governmental source.

Chorus is the service for electronic invoicing to French gvt.

This was working fine until recently when for an unknown reason, it stopped working.

a link to a current file is here:

https://communaute.chorus-pro.gouv.fr/annuaire-cpro/

If needed, I do keep some older file (2022?) on which your CLI software was working.

Hence, I am reporting this to you so that you may want to look into, if you have time

Cheers!

brechtsanders commented 6 months ago

I have not been able to see any crash when using the latest version of xlsxio_xlsx2csv on file AIFE-Chorus-Pro-Annuaire_20240319.xlsx downloaded from the link you supplied.

When you say it's not working, what exactly do you mean? Does it crash? Is the data wrong?

Which version were you using?

eblanpain commented 6 months ago

Thanks! I use -h to read the version number it says.Version: 0.2.21. Yet it is located in xlsxio-0.2.34-binary-win64\bin\xlsxio_xlsx2csv.exe

the XLSX has 2 sheets structures and Services. I use xlsxio_xlsx2csv from time to time, say once a week.

On earlier version of the file (say 2022) I could get 2 csv. Now,I only get one... The xlsxio_xlsx2csv does not crash, but does not see the second sheet as it used to do

using "C:...\xlsxio-0.2.34-binary-win64\bin\xlsxio_xlsx2csv.exe" "E:...\AIFE-Chorus-Pro-Annuaire_20240319.xlsx" Processing file: E:...\AIFE-Chorus-Pro-Annuaire_20240319.xlsx Sheet found: Structures, exporting to: E:...\AIFE-Chorus-Pro-Annuaire_20240319.xlsx.Structures.csv

Whereas Libreoffice does confirm that there should be a second sheet 'services', which it does not find Thanks for your help...

brechtsanders commented 6 months ago

Can you try again with the release I published yesterday?

eblanpain commented 6 months ago

By chance I had kept some older XLSX files from the same provider. recent files can be downloaded from the provider. Old AND new have 2 sheets (confirmed by LibreOffice)

Yet... With the Command Line:

Using version xlsxio-0.2.34-binary-win64 on an old source file (20221219) Sheet found: Structures, exporting to... Sheet found: Services, exporting to...

Using version xlsxio-0.2.34-binary-win64 on a newer source file (20240305) Sheet found: Structures, exporting to...

Using version xlsxio-0.2.35-binary-win64 on an old source file (20221219) Sheet found: Structures, exporting to... Sheet found: Services, exporting to...

Using version xlsxio-0.2.35-binary-win64 on a newer source file (20240305) Sheet found: Structures, exporting to...

jc101b commented 2 months ago

I just opened the problem.. xlsxio_xlsx2csv.exe does not convert xls spreadsheet. it does not lock..it simply exits without any message.

brechtsanders commented 2 months ago

You are right, the older .xls format won't import.

As the name imples XLSX I/O is only for .xlsx format.