SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.3k stars 1.93k forks source link

[QUESTION] Big exports (100k+ cells) fail at store function #2914

Closed ericr90 closed 3 years ago

ericr90 commented 4 years ago

Prerequisites

Versions

Description

When trying to export big datasets, we encounter memory issues when generating the download file. I tried various options to solve this problem, but I'm out of options. What I've tried:

Export goes to csv. I checked memory usage througout the script. All goes well until I call the Excel::store() function. Then memory goes through the roof, ending up in a memory exception. Ini_set tricks would work for small datasets, but it's not a real option for bigger datasets.

What other options do I have?

patrickbrouwers commented 4 years ago

PhpSpreadsheet is known to have difficulties processing very large datasets. When dealing with large datasets and csv, we usually use csv directly. We have a closed source library in the same fashion as this package that only uses csv. (In the simple cases, it should only be a replace of namespace) Feel free to shoot us an e-mail if you would be interested in buying a license.

stale[bot] commented 3 years ago

This bug report has been automatically closed because it has not had recent activity. If this is still an active bug, please comment to reopen. Thank you for your contributions.

vitorccs commented 2 years ago

Hi @ericr90, I had a project which also needed to export huge datasets and was experiencing memory issues.

I created a Laravel project https://github.com/vitorccs/laravel-csv/ which can export huge CSV files, and has been inspired on this awesome library Laravel-Excel, implementing some cool stuffs like FromQuery, WithMapping, WithHeadings, etc.

Hope this can be useful for you or other people.