I'm having a problem with copying a graph object from template Excel5 file to new Excel5 file.
I'm using CakePHP1.2 and PHPExcel 1.7.1. The code is below.
// read template xls file
$reader = PHPExcel_IOFactory::createReader('Excel5');
$excel = $reader->load(EXCEL_FILE_PATH."template.xls");
// set active sheet
$sheet = $excel->getActiveSheet();
// output excel file
$writer = PHPExcel_IOFactory::createWriter($excel, 'Excel5');
And there are a graph object in the template excel. This template excel has two sheets and one is main and another is the base data for the graph in the main sheet.
I expected that a copied file of template.xls which the name is output.xls would be created. It's actually created, however only a graph object wasn't copied. Other than that, everything has been copied such as Font, Letter, Color, Border and even image.
All I want to do is copy a template file to output file and change some letters and base data for the graph in the output file.
Did I miss something? Any advice would be appreciated.