-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Bug]: Spreadsheet objects cannot be serialized #4039
Comments
Can you share the stacktrace of the serialized exception |
Absolutely!
|
I see that you are using file store caching. Perhaps it would be a good idea to try a more performant caching store like redis, memcache(d). |
Hi Patrick, Thanks for your reply. Using a Redis cache, results in the same error. I think I will reside to crank up the memory instead.. |
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.50
What version of Laravel are you using?
v10.33.0
What version of PHP are you using?
8.2
Describe your issue
First thank you for this awesome package.
I really love the way we can code exports, but I am running into problems when I need to export large amounts of rows in multiple sheets with not too much memory available.
This is also probably not a Laravel Excel problem, as the underlying PhpSpreadsheet package does not allow serialisation of Spreadsheet object:
PHPOffice/PhpSpreadsheet#3291
I checked out the existing issues that mention similar error reports:
I tried several combinations of laravel caches (file|redis) and excel caches (memory|illuminate|batch) to make memory not the bottleneck when generating large excel exports.
I also tried different export concerns like FromGenerator, FromCollection, FromQuery and FromArray, but all generate the same error.
With the command I fiddle with settings to find the point till where I can generated a Workbook with multiple Sheets and lots of rows and columns:
How can the issue be reproduced?
I created a repository to reproduce the issue.
https://github.com/axyr/laravel-excel-serialization
This example generates a few sheets where the rows are filled with simple text generated from a foreach loop:
What should be the expected behaviour?
I would expect to create a "large" excel workbook without any errors.
The text was updated successfully, but these errors were encountered: