I'm currently working on a large inventory management system in PHP. We sometimes have the need of exporting very large excel export reports that could sometimes have 10,000 to 50,000 rows and up.
The problem with PHPExcel is that through my own benchmarks, the memory usage becomes exponential with more and more rows, and the time it takes to generate the export becomes exponentially longer. In other words the additional time needed to generate 5,000 more rows at 5,000 rows is much longer than the time it took to generate the first 5,000 rows.
I have looked into caching mechanisms with PHPExcel and it does not solve anything. I've also looked into XML generation outside of PHPExcel, and it is not compatible with Open Office. Excel can read specific XML files, but Open Office can't.
I could just create a tab delimited file outside of PHPExcel, and that could work - but I'd much prefer the ability to create a very large export through PHPExcel directly into Excel format.
Simply increasing the execution time is not a solution as the user shouldn't have to wait 30 seconds to a minute for an excel generated file. Nor is increasing the memory as there's no need to allocate 1 to 2 gigs for excel generation.
The only solutions I've found in the discussions and through google were to increase execution time, memory size, or to use the caching method:
PHPExcel_Settings::setCacheStorageMethod()
The first two solutions do not fix the problem, and the cache storage method has not made a dent in the problem.
Is there a way to just write out the file, save it, then just append the file without creating such large objects? Or is there a way to directly convert from tab delimited files, or xml without using so much memory?
Many people have encountered the same problem, but it doesn't seem like there is a viable solution yet.
Thank you for any advice you can give me.