Perubahan NIP petik kolom NIP, NPWP, dan Nomor Rekening semua export excel
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Models\Verifikator\Periode;
|
||||
use App\Models\Verifikator\Team;
|
||||
use App\Models\Verifikator\View\Pegawai;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use PhpOffice\PhpSpreadsheet\Cell\DataType;
|
||||
use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Alignment;
|
||||
use PhpOffice\PhpSpreadsheet\Style\Border;
|
||||
@@ -56,6 +57,9 @@ class RasioPoinKegiatanExport
|
||||
$sheet->setCellValue($cell, $header);
|
||||
}
|
||||
|
||||
// Kolom NIP Anggota sebagai teks, supaya NIP panjang tidak dibulatkan jadi notasi ilmiah
|
||||
$sheet->getStyle('E:E')->getNumberFormat()->setFormatCode('@');
|
||||
|
||||
// Style headers
|
||||
$headerRange = 'A1:N1';
|
||||
$sheet->getStyle($headerRange)->applyFromArray([
|
||||
@@ -146,7 +150,7 @@ class RasioPoinKegiatanExport
|
||||
}
|
||||
|
||||
// Set data anggota
|
||||
$sheet->setCellValue('E' . $row, "'" . $item['nip_anggota']); // Add quote to NIP
|
||||
$sheet->setCellValueExplicit('E' . $row, (string) $item['nip_anggota'], DataType::TYPE_STRING);
|
||||
$sheet->setCellValue('F' . $row, $item['nama_anggota']);
|
||||
$sheet->setCellValue('G' . $row, $item['unit_kerja_anggota']);
|
||||
$sheet->setCellValue('H' . $row, $item['posisi']);
|
||||
|
||||
Reference in New Issue
Block a user