I've started using your library today and I'm really impressed with the features available. There's 1 thing though that's limiting it's use for me and that's the problems with the amount of memory it needs when creating larger files. I'm trying to export
70k records with 500MB available as the memory_limit and I'm still getting a fatal error.
I've looked over this forum and it seems the library is really designed for smaller xlsx files - which is fine. So given that, I'm trying to export my data in smaller chunks, say 10k records at a time. The problem is that the memory allocated via php is
not being freed up after each file write.
The basics of the code are as follows:
$lStart = 0;
$lInc = 10000;
$lFinish = 70000;
for($i = 0; $i<$lFinish; $i=$i+$lInc)
$objPHPExcel = new PHPExcel();
$rowTracker = 1;
$sQL = mysql_query("SELECT * FROM table LIMIT ".$lStart.", ".($lStart+$lInc));
while ($row = mysql_fetch_assoc($sQL))
$objPHPExcel->getActiveSheet()->setCellValue('A' . $rowTracker, $row[...]);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
How can I clean up the memory used after each loop so the script doesn't fail? I've tried unset($objPHPExcel) & $objPHPExcel->distroy() without any luck.
Thanks in advance,