samedi 21 décembre 2019

Laravel excel: Excel::raw() method not working

I'm trying to handle rows with laravel excel, with the 2.1 version I used to use the create method and after that something like this:

Excel::create('text', function ($excel) use ($data) { 
     $excel->sheet('Transferencia detalle', function ($sheet) use ($data) { 
           $sheet->row(1, ['DE', 'Para', 'Transferencia #' . $data->id]);}); 
                  })->export('xls');

But the method create() was removed in the version 3.1(that I'm using), the thing is in the upgrade guide says that raw() replaces create() https://docs.laravel-excel.com/3.1/getting-started/upgrade.html, but I get the error Undefined class constant 'XLSX' any ideas of how to fix it?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire