Open windstep opened 2 years ago
As always when a corrupted file is generated, open the file in a text editor, and look for any PHP messages in the file
There are no php messages there i've sent an example file
I can see that the file has a corrupted zip header. Can you check the the version of maennchen/zipstream-php that's listed in your composer.lock file?
Note that we don't actively support PHP 7,2 any more from PHPSpreadsheet 1.20 onwards
In composer.lock I see 2.1.0
I have this problem too, The saved file is downloaded to windows 10, the EXCEL file cannot be opened thank you
i have the same issue in windows 11 and office 2021, but my file is builded with centos 7
Without a lot more information, such as a copy of the file, I can't possibly guess!
Try checking your logs for errors, or opening the file in a text editor and looking for human-readable messages there
This is:
What is the expected behavior?
Working xlsx file
What is the current behavior?
File is created, but corrupted. It reproduces only on server, running on centos 8, locally this code works fine
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:
On a fresh laravel instance in file routes/web.php
You may also copy this on basic .php file, but I didn't tested it that way.
Which versions of PhpSpreadsheet and PHP are affected?
We are using 1.20 version of phpspreadsheet, and php 7.2.34, running on centos 8 Generated file is below
1.xlsx .