Created At: 2026-05-21T13:36:19Z Completed At: 2026-05-21T13:36:19Z File Path: `file:///c:/wamp64/www/IHTS/app/Http/Controllers/Admin/AgentImportExportController.php` Total Lines: 554 Total Bytes: 25633 Showing lines 1 to 554 The following code has been modified to include a line number before every line, in the format: : . Please note that any changes targeting the original code should remove the line number, colon, and leading space. 1: 19: $totalSolde = $agent->profileAgent->compteurs->sum('solde_restant'); 520: $totalSoldeHrs = \App\Helpers\TimeHelper::decimalToHours($totalSolde); 521: 522: $sheet->setCellValue('A' . $rowIdx, $agent->id); 523: $sheet->setCellValue('B' . $rowIdx, strtoupper($agent->name)); 524: $sheet->setCellValue('C' . $rowIdx, $agent->firstname); 525: $sheet->setCellValue('D' . $rowIdx, $agent->email); 526: $sheet->setCellValue('E' . $rowIdx, $serviceName); 527: $sheet->setCellValue('F' . $rowIdx, $agent->profileAgent->est_admin ? 'Oui' : 'Non'); 528: $sheet->setCellValue('G' . $rowIdx, $agent->profileAgent->est_rh ? 'Oui' : 'Non'); 529: $sheet->setCellValue('H' . $rowIdx, $agent->profileAgent->est_chef_de_service ? 'Oui' : 'Non'); 530: $sheet->setCellValue('I' . $rowIdx, $agent->profileAgent->est_actif ? 'Actif' : 'Désactivé'); 531: $sheet->setCellValue('J' . $rowIdx, $totalSoldeHrs); 532: 533: $rowIdx++; 534: } 535: 536: // Autosize columns 537: foreach (range(1, count($headers)) as $colIdx) { 538: $colLetter = \PhpOffice\PhpSpreadsheet\Cell\Coordinate::stringFromColumnIndex($colIdx); 539: $sheet->getColumnDimension($colLetter)->setAutoSize(true); 540: } 541: 542: $response = new StreamedResponse(function () use ($spreadsheet) { 543: $writer = new Xlsx($spreadsheet); 544: $writer->save('php://output'); 545: }); 546: 547: $response->headers->set('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); 548: $response->headers->set('Content-Disposition', 'attachment;filename="export_agents_' . date('Y-m-d') . '.xlsx"'); 549: $response->headers->set('Cache-Control', 'max-age=0'); 550: 551: return $response; 552: } 553: } 554: The above content shows the entire, complete file contents of the requested file.