rizky92/xlswriter-for-laravel

Laravel wrapper package for php ext-xlswriter extension

0.1.2 2025-01-26 12:54 UTC

This package is auto-updated.

Last update: 2025-03-26 13:18:11 UTC


README

Laravel wrapper package for php ext-xlswriter extension.

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

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