mardi 20 septembre 2022

ErrorException : Trying to access array offset on value of type int

i'm getting the issue of "Trying to access array offset on value of type int" when i export the data using "maatwebsite/excel": "~2.1.0" Excel package.

Excel::create('Filename', function($excel) use ($data){
  $excel->sheet('Sheetname'), function($sheet)use ($data) {
    $sheet->fromArray($data); //getting error on this line
  });
}); 



$data = 
 array:198 [
   0 => array:19 [
     "Id" => 1
     "First Name" => "John"
     "Last Name" => "Doe"
     "comments" => null
   ]
   1 => array:19 [
     "Id" => 2
     "First Name" => "James"
     "Last Name" => "Harrison"
     "comments" => null
   ]
   ...


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/i58DagL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire