Peformance but how?

Topics: Developer Forum, Project Management Forum, User Forum
Jun 1, 2012 at 1:56 PM

Hey at all,

i'm writring a little Script to Export MySql Data into an xlsx Document using PHP.

For that I use PHPExcel 1.7.7 and it's realy nice. But I have a problem. I have around 800 up to 2500 Lines to export an if I run my PHP script on a Database with 890 lines it needs around 20 seconds. Have anybody an idee how to speed it up? Pleas help me!

Greetings Dave 

Coordinator
Jun 4, 2012 at 1:02 PM

There's a lot of information here on the boards to try and improve performance

e.g.

  • Take advantage of the fluent interface where practical to (for example) avoid repeated calls to getActiveSheet()
  • Use fromArray method to set cell values where appropriate
  • Set styles using ranges rather than for each individual cell