PHPSpreadsheet can't read XLSX file, which is readable by MsExcel and LibreOfficeCalc. Help, please. #2206
-
Hello, people! I need to read and process some XLSX file, which is created by some unknown third-party software. (See attached file in this message).
I get error message:
When I load this file into LibreOfficeCalc, then save it as another file and run the same script on a copy of file - everything is good, and this script prints "maxRow=7" Why??? This seems to be a bug. Help, please. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
The namespacing used in your file is unexpected by PhpSpreadsheet through release 1.18. However, we have recently implemented the first stage of a project to handle namespaces better. If you read your spreadsheet using master rather than release version, it should no longer throw an exception. Please note that the work is ongoing; you should be able to read all your data, but most of your styling (and possibly other things you would like to see) will be missing until we get to the next phase. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Unable to duplicate your problem. When I issue the composer require command above, with or without --with-all-dependencies, and run your script, making sure that require specifies the correct directory, I get the expected output (maxRow=7) and complete without throwing an exception. For the record, the files in my vendor directory all have today's date. |
Beta Was this translation helpful? Give feedback.
-
@oleibman Thanks for the work on the namespaces problem. The dev-master version works for now! Do you have any idea about when the changes for the namespaces will be included in the next release? I'm using https://github.com/Maatwebsite/Laravel-Excel and I need to manually edit my lock file, otherwise Laravel-Excel won't accept de dev-master branch. Works but kind of hacky 😄 |
Beta Was this translation helpful? Give feedback.
Thanks. My last problem was not in software, but in configuration files. Now everything is OK