0

I'm using maatwebsite/laravel-excel package to handle a very simple report generator. The following code is throwing an exception with the error 'Call to a member function setExtSheet() on null' in xxx/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php:232.

    Excel::create($filename, function ($excel) use ($reportData) {

        $excel->sheet('Sheet1', function ($sheet) use ($reportData) {

            $sheet->fromArray($reportData, null, 'A1', false, false);

        });

    })->export('xls');

The strange thing is that it works perfectly when I use ->export('xlsx') or ->export('csv'). It's only erroring when I use ->export('xls').

davidandrew
  • 183
  • 3
  • 15

0 Answers0