tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.43k stars 402 forks source link

Loading file fails with error: attribute 'localSheetId' expected #711

Open Beaky2000 opened 10 months ago

Beaky2000 commented 10 months ago

I have found that this issue was introduced with a52bcd5 (implement defined names) which was merged as c689943. It was not present in the previous commit f1107a5.

The attached file can not be loaded. Loading fails with an exception and the message "error: attribute 'localSheetId' expected"

localSheetId_Expected.xlsx

I am on Windows and have built xlsx using CMake and Visual Studio 2022.

Beaky2000 commented 10 months ago

I have found that this bug is fixed by https://github.com/tfussell/xlnt/pull/686

doomlaur commented 10 months ago

You are right. I hope #686 will be merged soon 🙂 Just for the record, this issue is a duplicate of issue #685.

flaviu22 commented 4 months ago

Any news about this fix? Has been merged?

doomlaur commented 2 months ago

Just for the record: because I did not need support for the definedNames introduced in Pull Request #650, I was able to fix my issues some time ago by simply compiling XLNT from the last commit made before the pull request has been merged. To be precise, I compiled XLNT from commit f1107a5b0f32857e40d17ab4989009ad92377c1e made on August 13, 2022 at 22:21:48. So I simply did a checkout in Git exactly to that commit and compiled XLNT from it, excluding the commits after it. In case you don't need definedNames, you can do the same - otherwise, Pull Request #686 should fix the issues (but, to be honest, I did not test it myself yet).