load($path)->getActiveSheet(); $highestRow = $sheet->getHighestDataRow(); // e.g. 10 for ($row = 1; $row <= $highestRow; ++$row) { if(!$colsFound) { continue; } $depNum = $sheet->getCell([$depNumCol, $row])->getValue(); $comNum = $sheet->getCell([$comNumCol, $row])->getValue(); $comNom = $sheet->getCell([$comNomCol, $row])->getValue(); $tauxTFPNB = $sheet->getCell([$tauxTFPNBCol, $row])->getValue(); $volTFPNB = $sheet->getCell([$volTFPNBCol, $row])->getValue(); $tauxTFPB = $sheet->getCell([$tauxTFPBCol, $row])->getValue(); $volTFPB = $sheet->getCell([$volTFPBCol, $row])->getValue(); $tauxTH = $sheet->getCell([$tauxTHCol, $row])->getValue(); $volTH = $sheet->getCell([$volTHCol, $row])->getValue(); $tauxCFE = $sheet->getCell([$tauxCFECol, $row])->getValue(); $volCFE = $sheet->getCell([$volCFECol, $row])->getValue(); } } } }