PHPackages                             pittacusw/excel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. pittacusw/excel

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

pittacusw/excel
===============

Collection-first Excel import and export helpers for Laravel

v2(2mo ago)080[4 PRs](https://github.com/PittacusW/excel/pulls)PHPPHP ^8.1CI passing

Since Apr 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/PittacusW/excel)[ Packagist](https://packagist.org/packages/pittacusw/excel)[ Docs](https://github.com/pittacusw/excel)[ GitHub Sponsors](https://github.com/PittacusW)[ RSS](/packages/pittacusw-excel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (8)Used By (0)

PittacusW Excel
===============

[](#pittacusw-excel)

Lightweight collection-first helpers for importing and exporting spreadsheets in Laravel.

This package wraps `maatwebsite/excel` with a smaller API for the common cases:

- export collections or arrays with optional headings
- auto-derive headings from associative rows
- import spreadsheets directly into an `Illuminate\Support\Collection`
- work cleanly across Laravel 9, 10, 11, 12, and 13

Compatibility
-------------

[](#compatibility)

LaravelTestbenchPHP9.x7.x8.1+10.x8.x8.1+11.x9.x8.2+12.x10.x8.2+13.x11.x8.3+Installation
------------

[](#installation)

```
composer require pittacusw/excel
```

Usage
-----

[](#usage)

Inject the service:

```
use PittacusW\Excel\Excel;

class ExportUsersController
{
    public function __invoke(Excel $excel)
    {
        return $excel->download(
            rows: [
                ['name' => 'Ada', 'email' => 'ada@example.com'],
                ['name' => 'Grace', 'email' => 'grace@example.com'],
            ],
            fileName: 'users',
        );
    }
}
```

Use the facade explicitly:

```
use PittacusW\Excel\Facades\Excel;

$rows = Excel::import(
    file: $request->file('users.xlsx'),
    headingRow: 1,
);
```

### Export API

[](#export-api)

```
use PittacusW\Excel\Excel;

$excel->download(
    rows: [
        ['name' => 'Ada', 'email' => 'ada@example.com'],
    ],
    headings: ['Name', 'Email'],
    fileName: 'users',
);

$excel->store(
    rows: [
        ['name' => 'Ada', 'email' => 'ada@example.com'],
    ],
    filePath: 'exports/users.xlsx',
);

$contents = $excel->raw(
    rows: [
        ['name' => 'Ada', 'email' => 'ada@example.com'],
    ],
);
```

### Import API

[](#import-api)

```
use PittacusW\Excel\Excel;

$rows = $excel->import(
    file: storage_path('app/imports/users.xlsx'),
    headingRow: 1,
);
```

Imported rows are returned as an `Illuminate\Support\Collection`.

Public API
----------

[](#public-api)

```
download(iterable $rows, array $headings = [], ?string $fileName = null, ?string $writerType = null, array $headers = [])
store(iterable $rows, string $filePath, array $headings = [], ?string $disk = null, ?string $writerType = null, array|string $diskOptions = [])
raw(iterable $rows, array $headings = [], ?string $writerType = null)
import(string|\Illuminate\Http\UploadedFile $file, int $headingRow = 1, ?string $disk = null, ?string $readerType = null)
makeExport(iterable $rows, array $headings = [], ?string $fileName = null)
makeImport(int $headingRow = 1)
```

Upgrade Notes
-------------

[](#upgrade-notes)

- The package now ships a real `PittacusW\Excel\Excel` service behind the facade.
- The automatic global `Excel` alias was removed to avoid collisions with `Maatwebsite\Excel\Facades\Excel`.
- Exports now normalize associative rows and can infer headings automatically.
- Imports now keep the imported collection available after execution.

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance89

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~341 days

Total

2

Last Release

61d ago

PHP version history (2 changes)v1PHP ^8.2

v2PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/97c33f4ec07e9426c6c66fe4d0b0840a31823e10992dcd1824bc91982d043ea3?d=identicon)[contal](/maintainers/contal)

---

Top Contributors

[![PittacusW](https://avatars.githubusercontent.com/u/5810290?v=4)](https://github.com/PittacusW "PittacusW (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

laravelexportexcelimportPittacusW

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pittacusw-excel/health.svg)

```
[![Health](https://phpackages.com/badges/pittacusw-excel/health.svg)](https://phpackages.com/packages/pittacusw-excel)
```

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[avadim/fast-excel-laravel

Lightweight and very fast XLSX Excel Spreadsheet Export/Import for Laravel

4146.7k1](/packages/avadim-fast-excel-laravel)[3x1io/filament-excel

Excel Export for Resources

224.2k1](/packages/3x1io-filament-excel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
