brechtsanders / xlsxio

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

question: xlsxio only sees first few sheets in file #67

Closed dpriedel closed 4 years ago

dpriedel commented 4 years ago

I am using the latest code from github compiled and running on linux.

I have an xlsx file which opens as expected in LibreOffice calc with no problems. If I run the xlsxio_xlsx2csv program on it however, I get cells listed from only the first 3 sheets in the file (there are 20 worksheets in the file with cells, none very large). zipinfo shows nothing unusual on any part of the file.

I can step through the code but there's a lot of code....

I'm looking for suggestions on what I might focus on to debug this.

Thanks !

yvwmash commented 4 years ago

donno, could you link a target xlsx file? i can look into it.

dpriedel commented 4 years ago

I did not mean to close this issue...clicked the wrong button

Here's the file There are 20 worksheets in it. Only the first 3 show. test.xlsx

Here's the output I get from running xlsxio_xlsx2csv on it

` xlsxio_xlsx2csv test.xlsx Processing file: test.xlsx Sheet found: Document and Entity Information, exporting to: test.xlsx.Document and Entity Information.csv Sheet found: Balance Sheets, exporting to: test.xlsx.Balance Sheets.csv Sheet found: Balance Sheets (Parenthetical), exporting to: test.xlsx.Balance Sheets (Parenthetical).csv

` Thanks for looking into this !!

yvwmash commented 4 years ago

compiled on linux64, latest code:

xlsxio_xlsx2csv test.xlsx gets me this(20 sheets total):

Processing file: test.xlsx Sheet found: Document and Entity Information, exporting to: test.xlsx.Document and Entity Information.csv Sheet found: Balance Sheets, exporting to: test.xlsx.Balance Sheets.csv Sheet found: Balance Sheets (Parenthetical), exporting to: test.xlsx.Balance Sheets (Parenthetical).csv Sheet found: Statements of Operations, exporting to: test.xlsx.Statements of Operations.csv Sheet found: Statements of Cash Flows, exporting to: test.xlsx.Statements of Cash Flows.csv Sheet found: Statements of Changes in Shareh, exporting to: test.xlsx.Statements of Changes in Shareh.csv Sheet found: Organization and Basis of Prese, exporting to: test.xlsx.Organization and Basis of Prese.csv Sheet found: Summary of Significant Accounti, exporting to: test.xlsx.Summary of Significant Accounti.csv Sheet found: Capital Stock, exporting to: test.xlsx.Capital Stock.csv Sheet found: Note Payable, exporting to: test.xlsx.Note Payable.csv Sheet found: Related Party Events, exporting to: test.xlsx.Related Party Events.csv Sheet found: Income Taxes, exporting to: test.xlsx.Income Taxes.csv Sheet found: Summary of Significant Accoun13, exporting to: test.xlsx.Summary of Significant Accoun13.csv Sheet found: Income Taxes (Tables), exporting to: test.xlsx.Income Taxes (Tables).csv Sheet found: Intangible Assets (Details Narr, exporting to: test.xlsx.Intangible Assets (Details Narr.csv Sheet found: Capital Stock (Details Narrativ, exporting to: test.xlsx.Capital Stock (Details Narrativ.csv Sheet found: Note Payable (Details Narrative, exporting to: test.xlsx.Note Payable (Details Narrative.csv Sheet found: Related Party Related Party Tra, exporting to: test.xlsx.Related Party Related Party Tra.csv Sheet found: Income Taxes - Reconciliation o, exporting to: test.xlsx.Income Taxes - Reconciliation o.csv Sheet found: Income Taxes (Details Narrative, exporting to: test.xlsx.Income Taxes (Details Narrative.csv

brechtsanders commented 4 years ago

How many sheets were actually in your .xlsx file? Can you send me an example file?

dpriedel commented 4 years ago

There are 20 sheets in the file.

Here iit is:

test.xlsx

dpriedel commented 4 years ago

compiled on linux64, latest code:

xlsxio_xlsx2csv test.xlsx gets me this(20 sheets total):

Processing file: test.xlsx Sheet found: Document and Entity Information, exporting to: test.xlsx.Document and Entity Information.csv Sheet found: Balance Sheets, exporting to: test.xlsx.Balance Sheets.csv Sheet found: Balance Sheets (Parenthetical), exporting to: test.xlsx.Balance Sheets (Parenthetical).csv Sheet found: Statements of Operations, exporting to: test.xlsx.Statements of Operations.csv Sheet found: Statements of Cash Flows, exporting to: test.xlsx.Statements of Cash Flows.csv Sheet found: Statements of Changes in Shareh, exporting to: test.xlsx.Statements of Changes in Shareh.csv Sheet found: Organization and Basis of Prese, exporting to: test.xlsx.Organization and Basis of Prese.csv Sheet found: Summary of Significant Accounti, exporting to: test.xlsx.Summary of Significant Accounti.csv Sheet found: Capital Stock, exporting to: test.xlsx.Capital Stock.csv Sheet found: Note Payable, exporting to: test.xlsx.Note Payable.csv Sheet found: Related Party Events, exporting to: test.xlsx.Related Party Events.csv Sheet found: Income Taxes, exporting to: test.xlsx.Income Taxes.csv Sheet found: Summary of Significant Accoun13, exporting to: test.xlsx.Summary of Significant Accoun13.csv Sheet found: Income Taxes (Tables), exporting to: test.xlsx.Income Taxes (Tables).csv Sheet found: Intangible Assets (Details Narr, exporting to: test.xlsx.Intangible Assets (Details Narr.csv Sheet found: Capital Stock (Details Narrativ, exporting to: test.xlsx.Capital Stock (Details Narrativ.csv Sheet found: Note Payable (Details Narrative, exporting to: test.xlsx.Note Payable (Details Narrative.csv Sheet found: Related Party Related Party Tra, exporting to: test.xlsx.Related Party Related Party Tra.csv Sheet found: Income Taxes - Reconciliation o, exporting to: test.xlsx.Income Taxes - Reconciliation o.csv Sheet found: Income Taxes (Details Narrative, exporting to: test.xlsx.Income Taxes (Details Narrative.csv

I just did a fresh clone of the repository, and a fresh build taking the cmake defaults.

I still get just 3 sheets when I execute xlsxio_xlsx2csv.

Could there be something in my minzip or libexpat?

What versions do you have?

Thanks

dpriedel commented 4 years ago

I found the answer.

I had taken the build defaults and linked with minizip. If I instead use libzip, then I get the correct output from xlsxio_xlsx2csv.

I don't know if the notes about xlsxio linked with libzip causing problems for LibreOffice when it reads files created with xlsxio are still true. My current project only involves reading these files.

Thanks !!

yvwmash commented 4 years ago

I found the answer.

I had taken the build defaults and linked with minizip. If I instead use libzip, then I get the correct output from xlsxio_xlsx2csv.

I don't know if the notes about xlsxio linked with libzip causing problems for LibreOffice when it reads files created with xlsxio are still true. My current project only involves reading these files.

Thanks !!

Hello,

I checked my build, and it is linked with "libzip".