PHPExcel Chart Problem

Jun 3, 2013 at 7:26 AM
Hi.,

please see my code :

// Write the Excel Value
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objReader->setIncludeCharts(TRUE);
$objPHPExcel = $objReader->load('Chart_Report.xls');
$objPHPExcel ->setActiveSheetIndex(0);
.
.
.
$objPHPExcel ->getActiveSheet()->setTitle("Project");
PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel , 'Excel2007');
$objWriter->setIncludeCharts(TRUE);
$objWriter->save($xl_file);
exit;

but the error show on :

Fatal error: Call to undefined method PHPExcel_Reader_Excel2007::setIncludeCharts() in D:\xampp\htdocs\weekly\index.php on line 12

i really don't understand, what i miss?
i'm newly for PHPExcel.

Please explain.

advance in thanks
Coordinator
Jun 3, 2013 at 9:41 AM
What version of PHPExcel?
Do the chart examples in /Tests work?
Jun 3, 2013 at 12:43 PM
Edited Jun 3, 2013 at 12:55 PM
Hi.,

version 1.7.6,
and check the example also., but not working.,

my requirement is:
i have a predefined excel file, with chart and formulas.
now call the value and replace the require place.

how can i attach the file in this forum?
Coordinator
Jun 3, 2013 at 1:03 PM
Edited Jun 3, 2013 at 1:04 PM
As chart support wasn't introduced until version 1.7.7, I'd expect this to be the case: if you're running 1.7.6, you shouldn't even have chart examples in /Test

I'd suggest that you update to a more recent version of PHPExcel and try again