0

I have an excel template which gets populated with data in one of the sheets. That data is used to update the charts in other sheets of the same excel file. the updated file now gets downloaded automatically. I use laravel-excel to update the data sheet but when i open the file that is downloaded, i find no charts in the sheets.The sheets just become empty. Although, the data gets updated in the other sheets, the charts are getting disappeared. Here's the code that i have written for the same.

Excel::load('maintemplate.xlsx', function($reader) use($data1, $data2)
                        {
                            $reader->setIncludeCharts(TRUE);

                            $sheet = $reader->sheet('Sales');
                            $sheet->fromArray($data1);

                            $sheet1 = $reader->sheet('Pivot');
                            $sheet1->fromArray($data2, null, 'D4', true); 

                        })->download('xlsx');

maintemplate.xlsx is the template file i have which gets populated with data once i run the php code. I have done lot of search for this kind of error on net and found about setIncludeCharts(); Even after setting it to true , i couldn't solve the problem. I even checked the downloaded file with different versions of excel.The problem persists in all of the versions.Please, someone help me with this.

Prady
  • 3
  • 6
  • have you solved it? i have the same problem – Dariel Pratama Jan 09 '16 at 12:38
  • Apparently there is a compatibility issue with laravel-excel and charts in excel. So, i moved on to use php-excel. This is something, i think, a bug that laravel-excel has to fix. – Prady Mar 29 '16 at 08:17

0 Answers0