79128597

Date: 2024-10-26 13:09:31
Score: 1
Natty:
Report link

I think you can't do it with this library. Laravel Excel uses PhpSpreadsheet, and this is a very "gluttonous" library. So I advise you to choose another library, for example avadim/fast-excel-reader, with its help you can read data into an array, process it and then write it to the database

$excel = Excel::open($file);
$sheet = $excel->sheet();
foreach ($sheet->nextRow() as $rowNum => $rowData) {
    // $rowData is array ['A' => ..., 'B' => ...]
    // handling of $rowData here
    // ...
}
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: aVadim