I'm using maatwebsite/excel 3.1,when importing excel file with 5 rows and 34 columns of data, it takes 500 rows and each row contains 703 columns and I need to decrease memory usage.
How to specify rows quantity and columns too?
...
public function collection(Collection $rows)
{
...
foreach($rows as $row){
if (!$row[0]) {
return;
}
...
$productArray = [...]
$this->product = $this->importProduct($row, $productArray);
}
}
...
public function chunkSize(): int
{
return 350;
}