You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1.48
What version of Laravel are you using?
9.52.4
What version of PHP are you using?
8.1.12
Describe your issue
When creating a multi-sheet export, the sheets method is called twice. This causes all the queries each sheet to be run twice which can be significant for an export with many sheets and a lof of data.
Could the call in WriterFactory::includesCharts() be handled in such a way that doesn't require a second instantiation of all the sheets?
privatestaticfunctionincludesCharts($export): bool
{
if ($export instanceof WithCharts) {
returntrue;
}
if ($export instanceof WithMultipleSheets) {
foreach ($export->sheets() as$sheet) {
if ($sheet instanceof WithCharts) {
returntrue;
}
}
}
returnfalse;
}
How can the issue be reproduced?
Create a multi-sheet export and download it.
What should be the expected behaviour?
The method to be called once.
The text was updated successfully, but these errors were encountered:
That's not possible. Make sure your logic inside sheet can be executed multiple times, either by handling the logic in the constructor or by caching it
it happens to me too. I realized when I export a report with different total data. the more data the report has, it become slower. then when I print the data on laravel log, I saw my query called twice. only happen when using "WithMultipleSheets"
this is what I used
What version of Laravel Excel are you using?
3.1
What version of Laravel are you using?
10
What version of PHP are you using?
8.1.10
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.48
What version of Laravel are you using?
9.52.4
What version of PHP are you using?
8.1.12
Describe your issue
When creating a multi-sheet export, the
sheets
method is called twice. This causes all the queries each sheet to be run twice which can be significant for an export with many sheets and a lof of data.Could the call in
WriterFactory::includesCharts()
be handled in such a way that doesn't require a second instantiation of all the sheets?How can the issue be reproduced?
Create a multi-sheet export and download it.
What should be the expected behaviour?
The method to be called once.
The text was updated successfully, but these errors were encountered: