Load a file with 25 sheets

Topics: Developer Forum
May 3, 2011 at 12:27 PM

Hi,

I am currently trying to load a 1.5Mb excel 2007 file that has 25 tabs (sheets) but the page crashes all the time.

What is the best way to read a file like that?

currently i am trying to do this:

$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp; 
$cacheSettings = array( 'memoryCacheSize ' => '2MB'); 
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
$objReader = new PHPExcel_Reader_Excel2007();
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($filename);

I also tried to read a sheet a time with

$objReader->setLoadSheetsOnly( array("Sheet " . $sheet+1, $sheet_names[$sheet])); //where sheet_names has all the names and $sheet is a counter from 0 to 24  

thanks