1

I'm using PHPExcel 1.6.7 on wamp. I'm trying to load a big xlsm file of ~2000kb (~2.0mb) At first, php complained of the time the script takes to load, then I changed that time in php.ini, then it complained of the memory size it consumes, again I increased that parameter in php.ini, finally I'm standing with Maxinum Execution Time ~ 5minuts and Memory Limit ~ 400mb and it's steel cannot be loaded. Is there any way to optimise the loading process meaningfully? something like telling it not to load styles or pictures or only load text?

(Do you know how ASP.NET loading excel files? would it be the same?)

apaderno
  • 28,547
  • 16
  • 75
  • 90
Bush
  • 2,433
  • 5
  • 34
  • 57

1 Answers1

1

Version 1.6.7 is a pretty old version of PHPExcel: the latest is 1.7.6 which allows options for caching cell data outside of PHP memory (either in an external cache like memcache, wincache, apc; or to disk) or in a compressed form in PHP memory (which reduces the overall memory usage). There are also options to load only the cell data rather than the formatting. All of this is fully described in the PHPExcel manual.

Some additional techniques are also descibed in this thread

Note that xlsm (Excel Macro) files aren't officially supported by PHPExcel

Community
  • 1
  • 1
Mark Baker
  • 209,507
  • 32
  • 346
  • 385