Web Analytics
 Cara Mudah Dari Excel Template dengan data PHP

Cara Mudah Dari Excel Template dengan data PHP


Install : composer require phpoffice/phpspreadsheet

 

Contoh Kode

use PhpOffice\PhpSpreadsheet\IOFactory;

use PhpOffice\PhpSpreadsheet\Spreadsheet;

use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

 

=============

 

$spreadsheet = IOFactory::load('word/form_absen.xlsx');

// Ambil sheet pertama

$sheet = $spreadsheet->getActiveSheet();

/// dd($sheet);

$sheet->setCellValue('C8', 'Data Baru 1');

$writer = new Xlsx($spreadsheet);

$writer->save('template.xlsx');


Lanjut Part : 1
Jam : 13:23:30
Durasi Part : 0:0:1
Durasi Total : 0:0:1

Punya Pertanyaan , Silahkan Whatsapp Langsung
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1
Theme Customizer

Theme Styles