QtExcel / QXlsx

Excel file(*.xlsx) reader/writer library using Qt 5 or 6. Descendant of QtXlsxWriter.
https://qtexcel.github.io/QXlsx/
MIT License
1.1k stars 347 forks source link

QXlsx after loading file cannot access cells on some files #310

Open skatz1971 opened 11 months ago

skatz1971 commented 11 months ago

I have some public excel files (possibly created by openpyxl). Document::load returns true on them. But after that dimension is in default state (negative values) and CellAt(row,col) returns NULL; If i resave file in Excel (with no changes), it opens normally. Example file: SGAREA100URI_2023_10_16.xlsx

Can any one make suggestion how to open them. (Files are downloaded from government site and I need to process them programmatically without manual interventions.)

skatz1971 commented 11 months ago

I Found problem - in /xl/_rels/workbook.xml.rels sheet relationship with Target="/xl/worksheets/sheet1.xml" reader considers path as releative and produces "xl/xl/worksheets/sheet1.xml", which cannot be found. As I see xlxs reader never considers absolute paths.