How to Read Large Worksheets from Large Excel Files (27Mb+) with PHPexcel

Large excel file is not generating, getting error: ERR_INVALID_RESPONSE

Issue resolved by just updating upload_max_filesize value from 2mb to 20mb in php.ini file.

Getting OOM with processing .xls using PHPExcel

unset ($objPHPExcel);

If you check the PHPExcel documentation, this won't cleanly unset $objPHPExcel because of cyclic references between the spreadsheet, worksheet and cells, and will result in memory leaks. The recommendation is to disconnect these cyclic references first.

$objPHPExcel->disconnectWorksheets();
unset($objPHPExcel);

There will still be some memory leakage, but it should allow more memory to be freed up between chunks



Related Topics



Leave a reply



Submit