I'm using phpexcel 1.8 to editing an xls.
In particular, the original file has 3 sheets
First with a graph and values
Second with an image
Third with some values
Here's the code
$excel2 = PHPExcel_IOFactory::createReader('Excel2007');
$excel2 = $excel2->load('test.xlsx'); // Empty Sheet
$excel2->setActiveSheetIndex(0);
$excel2->getActiveSheet()->setCellValue('A5', '999')->setCellValue('D7', '5');
$excel2->setActiveSheetIndex(2);
$excel2->getActiveSheet()->setCellValue('A7', '111');
$objWriter = PHPExcel_IOFactory::createWriter($excel2, 'Excel2007');
$objWriter->save('Nimit New.xlsx');
The resulting file is having the image in the 2nd sheet, but it doesn't have the graph in 1st sheet.
Is it possible to keep the graph (with updated values)?
Thanks