Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading Xls file with empty documentSummaryInformation #1882

Open
sebluy opened this issue Feb 24, 2021 · 1 comment
Open

Error loading Xls file with empty documentSummaryInformation #1882

sebluy opened this issue Feb 24, 2021 · 1 comment
Labels

Comments

@sebluy
Copy link

sebluy commented Feb 24, 2021

This is:

- [ x] a bug report
- [ ] a feature request
- [ ] **not** a usage question

What is the expected behavior?

The Excel file should load.

What is the current behavior?

I'm getting the following error:

PHP Error[8]: Uninitialized string offset: 27
in file .../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php at line 7959
#0 .../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php(1538): getInt4d()
#1 .../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php(645): PhpOffice\PhpSpreadsheet\Reader\Xls->readDocumentSummaryInformation()
PhpOffice\PhpSpreadsheet\Reader\Xls->load()

What are the steps to reproduce?

I'm not sure how to reproduce this one. When the code gets to readDocumentSummaryInformation(), the stream is empty but not null, and the code crashes. The problem only happens when I try to open certain files. The files open fine in LibreOffice, and if I re-save them using LibreOffice, then they open fine with PhpSpreadsheet. I'm not sure if this is necessarily a bug, or if the files I'm using are somehow corrupt. The files contain sensitive information so I can't upload them. Regardless, I thought I'd post this here in case it is a bug.

Which versions of PhpSpreadsheet and PHP are affected?

Tested on PHP 7.2.24, and PhpSpreadsheet 1.16 and 1.11.

@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant