I'm using PHPExcel to save large worksheets with tens of thousands of rows over multiple worksheets. As you probably know, PHPExcel takes its time to do that.
I've followed the suggestion do to this generation asynchronous: the website user submits a request for a certain report. A cronjob that runs a script every minute checks whether new reports need to be generated and this starts the process. This all works fine.
However, I would like to report progress on this report generation to the user. The collection of the data itself can take a long time, but I've managed to convert this to a proper indication of the progress. However, the following code:
$writer = \PHPExcel_IOFactory::createWriter($sheet, "Excel2007");
$writer->setPreCalculateFormulas(false);
$writer->save($output_file);
also takes quite a long time. Is there any way to register a callback that is called every now and again with an update on the total progress? A percentage between 0 and 100 would be great, for example, but as long as I can get a proper indication of how far along the saving progress is, that would be great. I can then use this information to report back to the user in the web interface the report is coming along.
Thanks for any suggestions.
I've followed the suggestion do to this generation asynchronous: the website user submits a request for a certain report. A cronjob that runs a script every minute checks whether new reports need to be generated and this starts the process. This all works fine.
However, I would like to report progress on this report generation to the user. The collection of the data itself can take a long time, but I've managed to convert this to a proper indication of the progress. However, the following code:
$writer = \PHPExcel_IOFactory::createWriter($sheet, "Excel2007");
$writer->setPreCalculateFormulas(false);
$writer->save($output_file);
also takes quite a long time. Is there any way to register a callback that is called every now and again with an update on the total progress? A percentage between 0 and 100 would be great, for example, but as long as I can get a proper indication of how far along the saving progress is, that would be great. I can then use this information to report back to the user in the web interface the report is coming along.
Thanks for any suggestions.