Better Performance vs. PEAR's Spreadsheet Classes

Topics: Developer Forum, User Forum
Apr 9, 2009 at 5:10 PM
My understanding is that PHPExcel uses PEAR's Spreadsheet_Excel_Writer for rendering Excel files, but obviously makes major enhancements (ie:  filters, stylistics, etc).  While I love PHPExcel, I need to automate reports that include 60,000+ rows, and this is a huge resource hog.  Even with 20,000 rows, it takes quite a lot of time to write an xlsx file with 11 columns autofiltered (and I have modified the .ini maxmimum memory usage/timeout).  Is there anyway to tone down the time/resources it takes to create a file this large?

Additionally, should I assume that the Spreadsheet_Excel_Writer from PEAR will take the same amount of time?
Developer
Apr 10, 2009 at 12:48 AM
We hope to improve performance for next release 1.6.7. I'm not sure how much styling you are using, but this in known to cause high memory usage in PHPExcel. You can check 23sharedstyles.php included in the Tests folder as a possible solution for reducing memory usage if you are using cell styling.

Only PHPExcel_Writer_Excel5 is based on PEAR Spreadsheet_Excel_Writer, PHPExcel_Writer_Excel2007 is not. The PEAR Spreadsheet_Excel_Writer writer is usually several times faster than the writers in PHPExcel. This is because it features shared styles. Unfortunately, extra considerations are needed when one wants to introduce shared styles in a library like PHPExcel featuring both readers and writers. This is what is currently being resolved.