Sep 22, 2010 at 10:05 PM
Edited Sep 22, 2010 at 10:37 PM
My apologies if this has been covered before. I tried searching but cannot find an exact answer.
I've got a large spreadsheet (32,000 rows * 50 columns, all on 1 worksheet) that are all styled in one way or another (currency, colors, alignment, etc). I've got 1GB allocated for PHP, but PHPExcel keeps running out of memory. I've been reading up about
PHPExcel's difficulties w/ memory (1k per cell, etc), and I downloaded the newest PHPExcel (1.7.4) to try out the new Cell Cache stuff.
Unfortunately, I'm either doing it wrong, or the spreadsheet is still too big. I've tried
cache_to_phpTemp, and cache_to_discISAM. Everything hits the memory limit. Here's how I'm using it:
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_discISAM;
$oPHPExcel = new PHPExcel();
This is the correct way to use caching, right?
I've tried using the latest SVN copy of PHPExcel as well (PHPExcel-61245), but it didn't work either. :(
The only other thing I can think of to mention is that we're using the Excel5 writer...
Are there any other tricks I may not know of for further optimizing the spreadsheet?
Finally, I'd like to say a huge thanks for making PHPExcel so amazing. It's been a life saver at work and a huge improvement over the old way we did things. Thanks a million!