My excel export runs incredibly slowly. When trying to export a 10,000 line array, it can take upwards of 5 minutes for the file to finish building.
Below is my code.
<?php
use \koolreport\excel\Table;
$sheetName = 'sheet1';
?>
<div sheet-name="<?php echo $sheetName; ?>">
<div>
<?php
Table::create(array(
"dataSource" => $this->exportData,
));
?>
</div>
</div>
public function exportNamedReport(Request $request)
{
$report = $request->route()->getAction()['report'];
$pageTitle = $request->route()->getAction()['pageTitle'];
$use = "App\Reports\\$report";
$report = new $use;
$report->run();
$report->exportToXLSX('reportExport')->toBrowser($pageTitle.".xlsx");
}
To reproduce these issues, I have been sending 10,000 line arrays via this code:
while ($i < 10000){
$export[] = array('test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test','test');
$i += 1;
}
$this->exportData = new \koolreport\core\DataStore($export);
Any ideas would be appreciated.