I use Maatwebsite
to load excel files. I'm loading fine several documents, until it gives the next error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /project1/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php on line 582
I'm went to config/excel.php
and update memoryCacheSize
setting to 128MB
. After do that I run php artisan cache:clear
and php artisan config:cache
. Try load again and returns me the same error.
How can I solve that?
I would recommend using box/spout for larger files. I have used both and typically use Maatwebsite for smaller files because of the flexibility of file types.
https://github.com/box/spout
Add this in your index.php file.
ini_set('memory_limit', '-1');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With