Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.13 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.13 KB

About

Laravel wrapper package for php ext-xlswriter extension.

Latest Stable Version Total Downloads License

Requirements

Install

Via composer CLI

composer require rizky92/laravel-xlswriter

Quick start

use Rizky92\Xlswriter\ExcelExport;
use App\Models\User;

$users = User::all(['id', 'username', 'created_at']);
$columnHeaders = ['User ID', 'Username', 'Registration date'];

$excel = ExcelExport::make('users.xlsx', 'Sheet 1')
    ->setBasePath('excel/users')
    ->setDisk('public')
    ->setColumnHeaders($columnHeaders)
    ->setData($users);

return $excel->export();

Documentation

TBA

License

MIT