Successful file loading with drawnings (pasted images) for next processing.
What is the current behavior?
For some files with drawings from old versions MS Excel the library throws exception PhpOffice\PhpSpreadsheet\Reader\Xlsx::getArrayItem(): Node no longer exists because of access unexisted property $xfrm->ext
How it will be solved?
There are several solutions:
Open file in new MS Excel and save it as new file. But it's unconvinient for clients.
(the new MS Excel version in docProps/app.xml 16.0300 fixes this problem)
Skip drawings by set read data only $xlsxReader->setReadDataOnly(true);. But I wanted process drawings too.
As you can see there is an empty node <a:xfrm rot="0"/>.
Here http://officeopenxml.com/drwSp-size.php (and on other pages) is not written that off and ext nodes are mandatory children in xfrm node, and vice versa - no.
Which versions of PhpSpreadsheet and PHP are affected?
Version 1.18.0 and master branch
I can create pull request.
If you need more information, please let me know.
Thanks for help!
I also get this error and try update library to new version, but problem still doesnt fix :c But your info very an very help me)))
Thank you!!!
This is:
What is the expected behavior?
Successful file loading with drawnings (pasted images) for next processing.
What is the current behavior?
For some files with drawings from old versions MS Excel the library throws exception PhpOffice\PhpSpreadsheet\Reader\Xlsx::getArrayItem(): Node no longer exists because of access unexisted property
$xfrm->ext
How it will be solved?
There are several solutions:
Open file in new MS Excel and save it as new file. But it's unconvinient for clients. (the new MS Excel version in docProps/app.xml 16.0300 fixes this problem)
Skip drawings by set read data only
$xlsxReader->setReadDataOnly(true);
. But I wanted process drawings too.Add checking to the xlsx reader that the property $xfrm->ext is exist or coalesce (??) operator here https://github.com/PHPOffice/PhpSpreadsheet/blob/master/src/PhpSpreadsheet/Reader/Xlsx.php#L1287 Example for the master branch:
What are the steps to reproduce?
I cannot link the file with mentioned problems. It's goods price list. But I can provide some information from inner xml files.
docProps/app.xml
xl/drawings/drawing1.xml
As you can see there is an empty node
<a:xfrm rot="0"/>
. Here http://officeopenxml.com/drwSp-size.php (and on other pages) is not written that off and ext nodes are mandatory children in xfrm node, and vice versa - no.Which versions of PhpSpreadsheet and PHP are affected?
Version 1.18.0 and master branch
I can create pull request. If you need more information, please let me know.