// ------------------------------- // 6. Output File // ------------------------------- $filename = 'Blangko_KK_Kosong_' . date('Ymd') . '.xlsx'; header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); header('Content-Disposition: attachment;filename="' . $filename . '"'); header('Cache-Control: max-age=0');
// ------------------------------- // 5. Footer (Tanda Tangan & Info) // ------------------------------- $footerRow = $row + 12; $sheet->setCellValue("G$footerRow", 'Kepala Desa/Lurah,'); $footerRow++; $sheet->setCellValue("G$footerRow", '_________________________'); $footerRow++; $sheet->setCellValue("G$footerRow", '(Nama jelas & stempel)'); Download Blangko Kartu Keluarga Kosong Excel
$row++; $sheet->setCellValue("A$row", 'Alamat:'); $sheet->setCellValue("B$row", '_________________________'); $sheet->mergeCells("B$row:H$row"); // ------------------------------- // 6
// ------------------------------- // 1. Header: KARTU KELUARGA // ------------------------------- $sheet->mergeCells('A1:H1'); $sheet->setCellValue('A1', 'KARTU KELUARGA'); $sheet->getStyle('A1')->getFont()->setBold(true)->setSize(16); $sheet->getStyle('A1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER); filename="' . $filename . '"')
// Create new Spreadsheet $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet();