-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
xls file cause the exception during open by Xls reader #402
Comments
I can confirm PHPExcel 1.8.1 can read that file, but not PhpSpreadsheet: <?php
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/../PHPExcel/Classes/PHPExcel.php';
\PHPExcel_IOFactory::load('test.xls');
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xls();
$reader->load('test.xls'); |
From what i've found, example spreadsheet in "test.zip" has a sequence of null-bytes being parsed for property sets. |
This file was generated 3rd party software (Scanlister). I understand this file may have mistakes in structure, but LibreOffice, OpenOffice, MS Office opened this files without any errors. I think such files should be supported by PhpSpreadsheet also. |
Agree with @odyswise. |
Affected by this bug too. Agreed. |
Also affected by this bug |
1 similar comment
Also affected by this bug |
+1. cannot parse XLS files previously parsed by phpexcel |
Could any of the devs comment on the priority of this issue? This is unfortunately affecting a critical production system. Would appreciate any insight you could provide. Thanks. |
I have had to resort to using PHPExcel instead.
… On Jun 20, 2018, at 8:14 PM, Chad Hydro ***@***.***> wrote:
Could any of the devs comment on the priority of this issue? This is unfortunately affecting a critical production system. Would appreciate any insight you could provide. Thanks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Same here, I reverted to phpexcel |
I have something ugly to handle this case like :
I hope a fix is on its way |
affected by this bug |
also affected |
also affected by this.... |
I have the same bug.
|
The faulty commit may have been identified. Would any of you be able to partially revert that commit, test it and submit a PR ? |
@Quix0r you wrote the commit that seems to be the source of the issue. Would you share your opinion on this ? |
ignore some exception in property stream
…der PHPOffice#402 revert commit 4b4831b with adding exceptions
…der PHPOffice#402 adding unit tests for OLERead and Reader\Xls, also adding changelog entry
…der PHPOffice#402 codestyle fixes
Is this resolved somehow? I'm still experiencing the same issue had to use the old PHPExcel to be able to read files. |
you can provide sample file to the users to fill out then upload it, that will save your day :) |
Should be fixed in 1.5.0 |
I can't provide an example since it contains sensitive personal data and if I open with LibreOffice and save it then it works. Documents I'm recieving is auto generated by the thirdpart software, some kind of dialer. I have found out that it doesn't work well with PHPExcel too, but there I had to change one line my self then it works as it should. I'm pretty sure that's not the right fix but it works for me for now. |
Sorry to cause some mess (?) which was never intended. I'm now with a new employer and |
Updating to version 1.5.0 worked for me, but I started getting "undefined index: 0" warnings (like.. a lot...) ... to avoid this, I had to set the reader as setReadDataOnly |
@GianinaSalomo thanks for reporting back. Maybe you could create a separate issue, linking to this one, with more details about the warnings ? |
I had the same issue today trying to load a .xls file ... turns out the file wasn't an .xls, it was actually a tab delimited text file, someone just saved it as .xls Solved it with the following.
|
This is:
What is the expected behavior?
Excel file opened for reading/write
I tried to use deprecated PhpExcel classes and the file opens successfully!
What is the current behavior?
Trying to open test excel file cause the exception:
What are the steps to reproduce?
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 1.1 php 7.1
test.zip
The text was updated successfully, but these errors were encountered: