-
-
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
[Bug]: FromArray exports only 1000 rows #4162
Comments
Update. First cell has to have a value in it. So problem is instead in hasRows function
` |
@ItprojektRepo is it resolved on your end? |
I filled A1 cell with a static value for it to work. If I leave it blank then it overwrites first 1000 rows. And looking at this logic it will always overwrite every 1000 rows if I would have a blank value in column A. So I simply made changes so my code would work, but the bug still exists. |
Replacing blank data with non blank data, such as "-", can solve the problem |
I don't see an easy other way to check if we are inserting in the first row, or if we are appending. If someone has a better way of doing this, please create a PR :) |
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1.55
What version of Laravel are you using?
11.10.0
What version of PHP are you using?
8.2.7
Describe your issue
FromArray export has only 1000 rows and only last data is present.
Found that problem is in Sheet.php -> appendRows function
It chunks 1000 and every time starts from cell A1. Meaning it overwrites existing data instead of appending
`public function appendRows($rows, $sheetExport)
{
if (method_exists($sheetExport, 'prepareRows')) {
$rows = $sheetExport->prepareRows($rows);
}
In here changing ->chunk(1000) to ->chunk(10000) prints all data
Reproducing:
Export array that has more than 1000 rows. Using FromArray.
Currently using Concerns FromArray, WithTitle, WithCustomValueBinder
How can the issue be reproduced?
Reproducing:
Export array that has more than 1000 rows. Using FromArray.
Currently using Concerns FromArray, WithTitle, WithCustomValueBinder
What should be the expected behaviour?
First rows are overwritten by rows that are over 1000
The text was updated successfully, but these errors were encountered: