如何修复Codeplex phpexcel中的内存错误?

我试图读取excel文件并将其转换为数组。 但即时通讯

following error. Fatal error: Allowed memory size of 1677721600 bytes exhausted (tried to allocate 38 bytes) in /var/www/import_excel/Classes/PHPExcel/Worksheet.php on line 2431 

我用下面的代码来阅读

 set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/'); include 'PHPExcel/IOFactory.php'; $inputFileName = $target_file; try { $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); } catch(Exception $e) { die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage()); } error_reporting(-1); ini_set('display_errors',1); $allDataInSheet = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); echo "<pre>"; print_r($allDataInSheet); die(); 

我需要获得excel数据作为数组。 但excel文件有130列和超过100行。 所以当我试图转换为数组。 即时通讯错误。 但是当我用较less的列和行尝试工作。 当我尝试与130列和50 +行获取错误。

有没有可用的替代方法来转换数组,而不是这个$ objPHPExcel-> getActiveSheet() – > toArray(null,true,true,true); 这条线。 请有人build议或帮助我解决这个问题。 谢谢