diff --git a/action/action_puestos_excel.php b/action/action_puestos_excel.php index 96c0fe9..50d6a74 100644 --- a/action/action_puestos_excel.php +++ b/action/action_puestos_excel.php @@ -40,13 +40,15 @@ foreach ($puestos as $puesto) { ->where('puesto_id', $puesto['puesto_id']) ->get('puesto_materia pm', columns: ['clave_materia', 'materia_nombre']); + $sheet->setCellValue('A1', $puesto['nombre']); + // Add header row for each 'materia' table - $sheet->setCellValue('A1', 'Clave Materia'); - $sheet->setCellValue('B1', 'Materia Nombre'); + $sheet->setCellValue('A2', 'Clave Materia'); + $sheet->setCellValue('B2', 'Materia Nombre'); // Set some styling for headers - $sheet->getStyle('A1:B1')->getFont()->setBold(true); - $sheet->getStyle('A1:B1')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); + $sheet->getStyle('A2:B2')->getFont()->setBold(true); + $sheet->getStyle('A2:B2')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER); // Start populating from the second row $row = 2; diff --git a/puestos.php b/puestos.php index aeb9db1..7abefdc 100644 --- a/puestos.php +++ b/puestos.php @@ -49,7 +49,7 @@