addExternalSheet() Except Error

Topics: Developer Forum, Project Management Forum, User Forum
Apr 26, 2012 at 5:52 AM
Edited Apr 26, 2012 at 7:25 AM

my code:

 

$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load(UPLOAD_PATH.$file);
$readerbase= PHPExcel_IOFactory::createReader('Excel2007');
$readerbase=new PHPExcel_Reader_Excel2007();
for($addsheet=0;$addsheet<$totalctgynum;$addsheet++){
	$readerbase->setReadDataOnly(true);
	$excel=$readerbase->load(BASETPL);
	foreach($excel->getAllSheets() as $sheet)
	{
		$objPHPExcel->addExternalSheet($sheet);
	}
}

the error because PHPExcel.php 452line ,the $sheet ,should be $pSheet

please help !

thanks

Coordinator
Apr 28, 2012 at 10:12 AM

Which version of PHPExcel? Line 452 in PHPExcel.php is a docblock comment in 1.7.6, and the getNamedRanges method definition in the latest SVN code. And I can't find any line in the addExternalSheet() method that should be changed.