0

I have big xlsx file (16 000 rows and 14 columns), I tried to use PHPExcel to read it, but I got error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 58 bytes) in Z:\home\xlsx.qqq\www\PHPExcel\Classes\PHPExcel\Worksheet.php on line 961.

Is it possible to read big xlsx file in php without such errors?

Thanx!

hakre
  • 193,403
  • 52
  • 435
  • 836
Mirgorod
  • 31,413
  • 18
  • 51
  • 63
  • 2
    possible duplicate of [PHP Excel Allowed Memory size exhausted](http://stackoverflow.com/questions/5560053/phpexcel-allowed-memory-size-of-134217728-bytes-exhausted) – Gordon Aug 12 '11 at 09:38
  • and more generally: http://stackoverflow.com/search?q=Allowed+memory+size+of+134217728+bytes+exhausted – Gordon Aug 12 '11 at 09:40

2 Answers2

1

Use PHPExcel cell caching system - you can find more in the documentation file included in the download package.

matino
  • 17,199
  • 8
  • 49
  • 58
0

I can think of two options. Either increase PHP's memory limit so that the entire file can be read into memory at once or read the file incrementally.

moteutsch
  • 3,741
  • 3
  • 29
  • 35