Laravel-Excel icon indicating copy to clipboard operation
Laravel-Excel copied to clipboard

[Bug]: When exporting csv of more than 1001 rows, if NO header rows are used, the output file is only 1000 rows

Open realtebo opened this issue 4 months ago • 2 comments

Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?

  • [X] Yes, it's still reproducable

What version of Laravel Excel are you using?

3.1.55

What version of Laravel are you using?

10.46.0

What version of PHP are you using?

8.1.3

Describe your issue

I hopw this issue will find you well.

I am exporting a huge amount of data, more than 10.000 rows

If we DO NOT use the concern "WIthHeadings", the output file is only 1.000 rows.

We think the problem is thiscode block: https://github.com/SpartnerNL/Laravel-Excel/blob/3.1/src/Sheet.php#L658-L676

Because when the code estabilish if the first line is not empty, actually is returning always false. So the export restart overwriting, at each 1000 rows of chunk, as per your code, from first line.

This behaviour doesn't happens if using an heading row.

But we absolutely need to do not have heading rows in our file.

How can the issue be reproduced?

Try to export a csv with a few of thousands of rows without WithHeadings Concerns

What should be the expected behaviour?

Every rows should be saved into file, not last 1.000

realtebo avatar Mar 05 '24 14:03 realtebo