-
-
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
[PROPOSAL] Allow exports with Lazy Collections #2344
Comments
In that case, you may check the Architecture documentation, which may clarify some of the concepts of Laravel Excel to you. |
It would only be interesting if we could turn PhpSpreadsheets reading into a generator, which could be possible because it has an iterator. I'll leave this open as a future improvement. PR's are welcomed. |
+1 |
@patrickbrouwers could you give me a hint on where I need to look at/start to implement the generator for PHPSpreadsheets? |
I guess you can base yourself on the https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/tests/Concerns/FromGeneratorTest.php example |
This was actually already possible when using the FromCollection concern:
|
You used to be able to use a LazyCollection for queued exports, but since this commit, it's required to use a Collection. Is there a reason this method was changed to force users to use a Collection? If we make the exportCollection method return Enumerable, that way you can pass a Collection or a LazyCollection. |
Any Updates ? on lazy collections for laravel excel 3.1 or there are any other solutions for this big data export. Meanwhile shoulQueue with fromQuery concerns still get memory exceptions for big data export
|
Haven't seen any PR's, so no updates. |
That commit had this absolutely needless change. I need to use LazyCollections but the interface doesn't allow me to and static checks fail. The whole package is rendered useless because of this... |
Please be polite towards the efforts of everyone who has contributed towards this package. If you feel something should be improved, you have the option to PR it. Writing comments like this add absolutely no value. |
@patrickbrouwers not my intention, sorry if the message came out feeling like that. I meant "rendered useless" for MY use case. |
Like I said before - and already did 2 years ago - if you want to improve it for your use-case, you can PR it. |
Prerequisites
Laravel 6.0
Versions
Description
If I understand Lazy Collections correctly, it cold be used to reduce the memory usage when exporting large datasets with laravel-excel.
Example
Need more information to prepare an example.
Additional Information
I am not entirely sure how laravel-excel works under the hood, so I don't have a clue if this is a valid proposal - it's more of an idea.
The text was updated successfully, but these errors were encountered: