From 6e4d7b716b3ab04368f1b4d83df44dfda083d92a Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 6 Sep 2024 13:08:11 -0600 Subject: [PATCH] =?UTF-8?q?Bot=C3=B3n=20Excel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/action_puestos_excel.php | 10 ++++++---- puestos.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) 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 @@