There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Writer_Excel2007: Not able to save if chart in sheet
I was just unable to unable to do the very simplest example of reading an existing excel workbook, containing an absolute simple pie chart, and writing it back without modifications using the Excel2007 Writer facility.
$reader = PHPExcel_IOFactory::createReader('Excel2007);
$obj = $reader->load('myfile.xlsx');
$writer = PHPExcel_IOFactory::createWriter($obj,'Excel2007);
Using the official release 1.7.7, I got the following error:
Argument 2 passed to PHPExcel_Writer_Excel2007_StringTable::writeRichTextForCharts() must be an instance of PHPExcel_RichText, array given, called in /Users/alex/dev/IntV/backend/app/phpexcel/PHPExcel/Writer/Excel2007/Chart.php on line 141 and defined in <b>/Users/alex/dev/IntV/backend/app/phpexcel/PHPExcel/Writer/Excel2007/StringTable.php</b> on line <b>232
This seems to be fixed in the latest "develop" github branch, but then it failed with the following 2 errors:
htmlspecialchars() expects parameter 1 to be string, array given in <b>/Users/alex/dev/IntV/backend/app/phpexcel/PHPExcel/Shared/XMLWriter.php</b> on line <b>118
Invalid argument supplied for foreach() in <b>/Users/alex/dev/IntV/backend/app/phpexcel/PHPExcel/Writer/Excel2007/Chart.php</b> on line <b>958
I attach the very basic worksheet I am using, which is really a 1-minute-dumb sheet.
So it seems that chart writing in general is somehow broken, or what am I missing?
thanks for any help,