How to optimize PHPExcel ?

Topics: User Forum
Oct 14, 2010 at 8:49 AM


I'm using  PHPExcel to build an Excel file with 10 000 rows and 50 columns and it takes more than 20 minutes which is too long. Further more, the memory impact is very significant (500 Mo).

Have you got any idea to optimize the process ?

Thank you in advance.


Oct 14, 2010 at 9:15 AM

Use cell caching to reduce memory, but this will also slow the script. Apply styles to rows/columns/ranges where possible rather than individual cells, search through the threads here to find other answers to this question.

Oct 14, 2010 at 9:49 AM



Oct 14, 2010 at 1:59 PM



we also use it with large datasets. Can you give an estimation of the performance impact (cpu/mem) of using cell cache? Do you do a lot of styling?




Oct 15, 2010 at 8:29 AM


For 10 000 rows whith 50 columns :

-  memory usage is 500 Mo

- 20 minutes execution

Whithout styling i have the same results.

Cell cache increase the execution time so i have a timeout (50 minutes).


With 30 000 rows, the memory usage is 1 Go and i have a timeout 50 minutes.

PHpExcel is too long for me!