From a3ad23c48c5e9d3c8b98f6a20e06396841231743 Mon Sep 17 00:00:00 2001 From: Nur Izzati Date: Wed, 11 Mar 2026 13:53:08 +0800 Subject: [PATCH] update column --- app/Exports/SAExportAudit.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Exports/SAExportAudit.php b/app/Exports/SAExportAudit.php index 757f3d9..b52a876 100644 --- a/app/Exports/SAExportAudit.php +++ b/app/Exports/SAExportAudit.php @@ -139,6 +139,14 @@ class SAExportAudit implements FromCollection, WithHeadings, WithTitle, WithMapp $sheet->getStyle("C5:C{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER); $sheet->getStyle("D5:D{$lastRow}")->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER); + // Wrap text untuk semua column + $sheet->getStyle("A5:{$lastCol}{$lastRow}")->getAlignment()->setWrapText(true); + + // Auto-fit semua column berdasarkan content + foreach (range('A', $lastCol) as $col) { + $sheet->getColumnDimension($col)->setAutoSize(true); + } + return []; }