PHPackages                             osmaviation/spreadsheet - 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. osmaviation/spreadsheet

ActiveLibrary

osmaviation/spreadsheet
=======================

A simple wrapper around PHP Spreadsheet

1.10(7mo ago)010.5kPHPCI failing

Since Jun 28Pushed 7mo agoCompare

[ Source](https://github.com/osmaviation/spreadsheet)[ Packagist](https://packagist.org/packages/osmaviation/spreadsheet)[ RSS](/packages/osmaviation-spreadsheet/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (13)Used By (0)

Spreadsheet
===========

[](#spreadsheet)

A simple Laravel abstraction to the PHPSpreadsheet (previously PHPExcel) library, ideal for writing XLSX (Excel) files.

Installing
----------

[](#installing)

`composer require osmaviation/spreadsheet`

Using
-----

[](#using)

### Via resolve

[](#via-resolve)

```
$filename = 'my-filename.xlsx';

resolve('spreadsheet')->create($filename, function ($excel) {
    $excel->sheet('Worksheet', function ($sheet) {
        $sheet->fromArray([
            'Foo',
            'Bar',
        ], null, 'A1', true, false);
    });
});
```

### Via facade

[](#via-facade)

```
use OSMAviation\Spreadsheet\Facades\Spreadsheet;

$filename = 'my-filename.xlsx';

Spreadsheet::create($filename, function ($excel) {
    $excel->sheet('Worksheet', function ($sheet) {
        $sheet->fromArray([
            'Foo',
            'Bar',
        ], null, 'A1', true, false);
    });
});
```

### Via injection

[](#via-injection)

```
use OSMAviation\Spreadsheet\PhpSpreadsheet as Spreadsheet;

class MyController
{
    public function store(Spreadsheet $spreadsheet)
    {
        $filename = 'my-filename.xlsx';

        $spreadsheet->create($filename, function ($excel) {
            $excel->sheet('Worksheet', function ($sheet) {
                $sheet->fromArray([
                    'Foo',
                    'Bar',
                ], null, 'A1', true, false);
            });
        });
    }
}
```

### Saving the spreadsheet

[](#saving-the-spreadsheet)

```
$filename = 'some-folder/my-filename.xlsx';

Spreadsheet::create($filename, function ($excel) {
    $excel->sheet('Worksheet', function ($sheet) {
        // $sheet will be a PhpOffice\PhpSpreadsheet\Worksheet\Worksheet instance
        $sheet->fromArray([
            'Foo',
            'Bar',
        ], null, 'A1', true, false);
    });
})->store('local');
```

### Loading a file

[](#loading-a-file)

```
Spreadsheet::load($filename, function ($excel) {
    $excel->sheet('Some existing sheet', function($sheet) {
        //
    });
});
```

You can also pass the disk name as the second argument to the `load` method to load files from a different file system.

```
Spreadsheet::load($filename, 's3', function ($excel) {
    $excel->sheet('Some sheet', function($sheet) {
        //
    });
});
```

### Accessing a PHPSpreadsheet spreadsheet

[](#accessing-a-phpspreadsheet-spreadsheet)

The callback for the create method will provide an instance of `OSMAviation\Spreadsheet\Spreadsheet` which is a convenience layer for creating worksheets. You can access the vendor spreadsheet by using the `getSpreadsheet` method.

```
Spreadsheet::create($filename, function ($excel) {
    $vendorSheet = $excel->getSpreadsheet(); // returns a PhpOffice\PhpSpreadsheet\Spreadsheet instance
})->store('local');
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance65

Regular maintenance activity

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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 ~208 days

Recently: every ~516 days

Total

12

Last Release

213d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16b2089f55ff5ab3154ef21caec78446d23b1515cc074d2d1c2bf184a9e64603?d=identicon)[tormjens](/maintainers/tormjens)

---

Top Contributors

[![tormjens](https://avatars.githubusercontent.com/u/3974889?v=4)](https://github.com/tormjens "tormjens (19 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

### Embed Badge

![Health badge](/badges/osmaviation-spreadsheet/health.svg)

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

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M710](/packages/maatwebsite-excel)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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