I have over 400,000 rows of data in table.Then I follow the documentation, execute scripts as queue.
But something as wrong so that the script can not be executed properly.

ExcelCommand.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Exports\ExcelExport;
class Export extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'export:excel';
/**
* The console command description.
*
* @var string
*/
protected $description = 'export excel';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
(new ExcelExport)->store("demo.xlsx");
$this->info("export success");
}
}
?>
ExcelExport.php
<?php
namespace App\Exports;
use App\Models\Excel;
use Illuminate\Contracts\Queue\ShouldQueue;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithHeadings;
class ExcelExport implements FromQuery, ShouldQueue
{
use Exportable;
public function query()
{
return Excel::query();
}
}
?>
Perhaps you could try assigning some more memory? (reference)
Or try using FromIterator instead.
Perhaps you could try assigning some more memory? (reference)
Or try using FromIterator instead.
Thank you very much for suggestion. I had to give up using laravel-excel. I hope that in the near future, laravel-excel will support big data more friendly
Perhaps you could try assigning some more memory? (reference)
Or try using FromIterator instead.Thank you very much for suggestion. I had to give up using laravel-excel. I hope that in the near future, laravel-excel will support big data more friendly
Version 3.2 will have cell caching, which should decrease the amount of memory issues.
I don't have an expected release date for 3.2 yet.
Version 3.2 will have cell caching, which should decrease the amount of memory issues.
So exciting! I'm looking forward to the next version.
Perhaps you could try assigning some more memory? (reference)
Or try using FromIterator instead.
There is no documentation about FromIterator method. Could please someone explain me, how do you use FromIterator method with Queued Export? Thank you in advance!
Most helpful comment
Version 3.2 will have cell caching, which should decrease the amount of memory issues.
I don't have an expected release date for 3.2 yet.