Any other thoughts?
SUMIF() is a more complex formula, and won't work with Excel5, because it isn't a core function in that version of Excel; but it shouldn't cause any problems with Excel2007.
Other than PHP limits on time and memory: no ideas! Version 1.7.5 is faster and uses less memory than previous versions of PHPExcel, but it is still limited, and still not as fast as the older PHP Excel writers (such as the PEAR writer); however, 2000 rows
(you don't say how many columns) isn't particularly large. My core performance tests are based on reading a 2048x9 worksheet (1 formula column), to which I add 3 additional formula columns (and a sum line) before writing. The timing and memory results on my
little netbook, running Apache/mod_php:
Load Tests from Excel5 file
Call time to create Reader was 0.1702 seconds
Current memory usage: 2.5 MB
Call time to read Workbook was 8.0049 seconds
Current memory usage: 25.75 MB
Add new columns to PHPExcel Object
Call time to add new formulae was 2.2114 seconds
Current memory usage: 31.5 MB
Write Tests to Excel5 file
Call time to instantiate Excel5 writer was 0.0981 seconds
Current memory usage: 32.25 MB
Call time to save Workbook to file was 24.8102 seconds
Current memory usage: 37.5 MB
Peak memory usage: 40.25 MB
PHPExcel's "in-memory" model doesn't include calculation unless this is explicitly requested, either when using the getCalculatedValue() method to get the cell value, or when writing to file.
When writing to xls or xlsx, PHPExcel will execute formulae by default so that it can write both the formulae and the result to the file, and that can slow down the process quite considerably (dependent on the complexities of the formula) but setPreCalculateFormulas(false)
disables this calculation, so it only writes the formulae. This can reduce memory usage to just an additional 2-3 MB for the writer itself (no need to include the calculation engine) and double the speed of writing (dependent on the number of formulae
in the worksheet). The cost is forcing MS Excel to do the recalculation (not always done automatically) when the resultant file is opened in MS Excel.