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

XLSX files edited and saved in Libre Office can not be loaded #686

Closed
BlackMambaCoder opened this issue Sep 25, 2018 · 1 comment
Closed
Labels

Comments

@BlackMambaCoder
Copy link

I noticed that there are problems with loading XLSX files edited and saved in Libre Office (on MacBook and Ubuntu). Files saved as XLS are not throwing any errors.

The error displayed: Cell coordinate can not be zero-length string
The stack trace:
...
#0 /.../phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(1260): PhpOffice\PhpSpreadsheet\Cell\Coordinate::coordinateFromString('')
#1 /.../phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(1220): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->createNewCell('')
#2 /.../phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php(1693): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->getCell('')
#3 /.../phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php(1151): PhpOffice\PhpSpreadsheet\Worksheet\Worksheet->mergeCells('1:1')
.....

I noticed it happened on the $objReader->load($path).

protected function loadSpreadsheet($path)
{
        /**  Identify the type of $inputFileName  **/
        $inputFileType = IOFactory::identify($path);

        /**  Create a new Reader of the type that has been identified  **/
        $objReader = IOFactory::createReader($inputFileType);

        /**  Load $inputFileName to a PHPExcel Object  **/
        return $objReader->load($path);
}

Files edited and saved on Windows Excel are not throwing any errors too.

@stale
Copy link

stale bot commented Nov 24, 2018

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 Nov 24, 2018
@stale stale bot closed this as completed Dec 1, 2018
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