How to fix memory getting exhausted with PHPExcel?

前端 未结 8 531
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 04:43

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1078799 bytes) in D:\\xampplite\\htdocs\\Scraper\\PHPExcel\\Reader\\Exc

8条回答
  •  伪装坚强ぢ
    2020-11-28 05:26

    One thing you should note too is empty cells.

    I had the same issue, only 800 rows of data and the script was not even able to read. Both timeouts and out of memory errors when either was fixed.

    Something @Mark Baker said about cells got me thinking. I noticed that I had loads of empty cells and copying only the cells with data to a new workbook got it to run in a second.

    Hope this helps someone.

提交回复
热议问题