This question already has an answer here:
- PHPExcel runs out of 256, 512 and also 1024MB of RAM 7 answers
I am using phpexcel to write quite a large excel file.
I am writing it from an array that looks like
array(
[0] => stdClass Object
(
[sent] => Mar 31st, 2011 02:10PM
[to_number] => 64211111111
[additional_txt] =>
[misc_data] =>
)
...
[14058] => stdClass Object
(
[sent] => Mar 31st, 2011 02:10PM
[to_number] => 64211111111
[additional_txt] =>
[misc_data] =>
)
)
The loop is
$r = 0;
foreach ($replies_obj as $row) {
$c = 'A';
foreach ($row as $col)
$xlsx->getActiveSheet()->setCellValue($c++ . $r, $col);
$r++;
}
and the error is
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 105 bytes) in /home/webspace/xxxx/test/htdocs/application/libraries/PHPExcel/Worksheet.php on line 961
Is this a phpexcel problem or am I doing something wrong?
How can I fix this?