Strange error message

Topics: Developer Forum, User Forum
Sep 9, 2008 at 3:33 PM
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 456 bytes) in ...libraries\PHPExcel\Cell\DataType.php on line 126

But there is no line number in this file!

And import was working!

error_reporting(E_ALL ^ E_NOTICE);
        $objReader = new PHPExcel_Reader_Excel5();
        $this->objPHPExcel = $objReader->load($fileName);
Sep 9, 2008 at 4:13 PM
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 264 bytes) in D:\xampp\htdocs\myapp\libraries\PHPExcel\Cell.php on line 770

XAMPP or WampServer for WinXP SP3
Sep 9, 2008 at 4:26 PM
9    3.9370    33550024    PHPExcel_Worksheet->setCellValueByColumnAndRow( )    ..\Excel5.php:1315
10    3.9370    33550192    PHPExcel_Worksheet->setCellValue( )    ..\Worksheet.php:700
11    3.9370    33550192    PHPExcel_Worksheet->getCell( )    ..\Worksheet.php:688
Sep 9, 2008 at 4:29 PM
Can you add this method:

loadSheetByName/loadsheetByIndex to parse only needed sheets and not all!
Sep 9, 2008 at 8:07 PM
Is there possible to create standalone Worksheet object without linking to Workbook?
PS. Are memory requirements for loading CSV file the same as for Excel5 with OnlyData?
Sep 9, 2008 at 10:24 PM
Hmm... I have no explanation for your strange error message. Option for reading only the needed sheets may be the solution.
Sep 10, 2008 at 9:13 AM
memory not enough;@ini_set("memory_limit","50M");/*50M or more*/
Sep 10, 2008 at 7:39 PM
memory and time limit can not help.

Solution (I think the best and may be the only for data loading from Excel file):

Save all sheet as CSV files to ZIP (Macro for Excel / Calc needed), upload to server and parse using (see also comments)

This is much more faster and without memory overhead.