Botón Excel
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
</button>
|
||||
<button type="button" class="btn btn-success mx-2" @click="descargar()">
|
||||
<span class="ing-descarga"></span>
|
||||
Agregar Excel
|
||||
Descargar Excel
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user