I am unable to upload big excel file with 46 mb of one sheet

Jul 4, 2014 at 8:25 AM
I got this error when tring to upload

Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message 'The filename ./sampleData/Mrg_Data.xlsx is not recognised as an OLE file' in D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Shared\OLERead.php:89 Stack trace: #0 D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Reader\Excel5.php(1164): PHPExcel_Shared_OLERead->read('./sampleData/Mr...') #1 D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Reader\Excel5.php(612): PHPExcel_Reader_Excel5->_loadOLE('./sampleData/Mr...') #2 D:\xampp\htdocs\excel\PHPExcel\Documentation\Examples\Reader\exampleReader11.php(79): PHPExcel_Reader_Excel5->load('./sampleData/Mr...') #3 {main} thrown in D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Shared\OLERead.php on line 89


is there any solution for it ...

I use this
PHPExcel/Documentation/Examples/Reader/exampleReader11.php
Coordinator
Jul 4, 2014 at 8:36 AM
Are you sure that's what you're using?

exampleReader11.php loads a BIFF-format (.xls) file called sampleData/example2.xls. From the stack trace you're showing, You're trying to load a file called sampleData/Mrg_Data.xlsx (the extension suggests that it's an OfficeOpenXML format file) using the Excel5 reader.... you neglect to mention that you've made those changes.

If you want to load an OfficeOpenXML-format .xlsx file, you use the Excel2007 Reader, not the Excel5 Reader.

I suggest that you have a look at the other files under /Documentation such as PHPExcel User Documentation - Reading Spreadsheet Files that explains about the different spreadsheet file formats and how to read them
Jul 4, 2014 at 9:38 AM
Kindly suggest me which example is suitable for me to load 46mb xlsx file..
thanks
Jul 4, 2014 at 10:43 AM
Edited Jul 4, 2014 at 10:44 AM
Currently I remove comments from Excel 2007 and add comments at Excel5 but it gives error like..

Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 1)
Loading file Mrg_Data.xlsx using IOFactory with a defined reader type of Excel2007
Loading WorkSheet using configurable filter for headings row 1 and for rows 2 to 21

Warning: simplexml_load_string() [function.simplexml-load-string]: Memory allocation failed : growing buffer in D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Reader\Excel2007.php on line 652

Warning: simplexml_load_string() [function.simplexml-load-string]: Memory allocation failed : growing buffer in D:\xampp\htdocs\excel\PHPExcel\Classes\PHPExcel\Reader\Excel2007.php on line 652
array(1) { [1]=> array(1) { ["A"]=> NULL } }

Loading WorkSheet using configurable filter for headings row 1 and for rows 22 to 41
Jul 5, 2014 at 7:08 AM
Is there any solution for that ...

can you guide me ..
Coordinator
Jul 5, 2014 at 8:01 AM
Looks like you don't have enough memory available for PHP To load the file.... if you're getting that error against a simplexml_load_string() call, you certainly need to increase the memory available to PHP
Jul 7, 2014 at 4:30 AM
Thanks

I have enough memory available for PHP that is 12800mb of memory limit and post_max_size = 12800M and upload_max_filesize = 12800M is there any other memory size describe in PHP ...