maatwebsite/excel not being able to export more than 1,000 rows
Hi everyone, I am facing a really weird error on this maatwebsite/excel package. It works fine for reports under 999 rows, it generates excel (using a collection), sets rows and headers and everything loads just fine. But somehow when you hit 1,000 rows it screws everything up. It moves all the content from rows and only sets the data from row 1 to 1000 (without headers, also with all the data not in order).
Do you know if this module has any limits or something? I have tried increasing php memory limits and everything related to language settings but still nothing works.
Also, I know my collection works since I can print it on logs and it shows everything just fine. the collection also normally includes everything (headers and content for the report) but somehow when it passes to Excel::download method it gets messed up.
@pablosalazarbr That package can certainly handle more than 1000 rows.
Have you restarted the service after changing the memory limit configuration?
Have you checked the logs to see if there are any clues?
How large is the dataset? You might try chunking the export.
Can you share some code?
@ioiofadhil Hi, I fixed it in the past, editing Sheet.php file under the vendor>maatwebsite>excel>src>Sheet.php file, line 670 has a chunck function which has a set of 1k rows, if you change that to 20,000 (in example) it will let you get all your rows formatted and so on you can modify it to reach the limit rows you need.
I am sure this bug has something to deal with the empty cells as you mentioned but if you want to keep them empty and make it work that is how I did it.