PHPackages                             easy-excel/polyfill - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. easy-excel/polyfill

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

easy-excel/polyfill
===================

PhpSpreadsheet-compatible API backed by the easy-excel FrankenPHP extension (Go/excelize).

v0.1.6(1mo ago)1201MITPHPPHP &gt;=8.3

Since Jun 12Pushed 1w agoCompare

[ Source](https://github.com/xiidea/easy-excel-polyfill)[ Packagist](https://packagist.org/packages/easy-excel/polyfill)[ RSS](/packages/easy-excel-polyfill/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)DependenciesVersions (7)Used By (0)

easy-excel/polyfill
===================

[](#easy-excelpolyfill)

PhpSpreadsheet-compatible PHP API backed by the **easy-excel** FrankenPHP extension — spreadsheet heavy lifting (XML, ZIP, parsing, formulas) runs in compiled Go via [excelize](https://github.com/qax-os/excelize), while your code keeps using the `PhpOffice\PhpSpreadsheet\*` classes it already knows.

This package is the PHP half of [xiidea/easy-excel](https://github.com/xiidea/easy-excel)(the Go extension, build pipeline, benchmarks and design docs live there). Versions are tagged in lockstep: `vX.Y.Z` here matches `vX.Y.Z` of the extension and the `ghcr.io/xiidea/frankenphp8.5-easy-excel:X.Y.Z` image.

Why
---

[](#why)

Measured on the reference workload (write N rows × 10 mixed columns, PHP 8.5):

Library100k rows1M rowsPeak PHP memoryPhpSpreadsheet 5.814.74s—665MB at 100kOpenSpout 4.x3.64s36.74s4MBfast-excel-writer 6.x2.67s28.16s4MB**easy-excel****0.82s****7.85s****4MB**PhpSpreadsheet ergonomics at OpenSpout-class constant memory, several times faster than both. Styled-report numbers and the full methodology are in the [main repository](https://github.com/xiidea/easy-excel#measured-performance).

Requirements
------------

[](#requirements)

- PHP ≥ 8.3 running on **FrankenPHP built with the easy-excel extension**. The easiest way is the published image:

    ```
    docker pull ghcr.io/xiidea/frankenphp8.5-easy-excel:latest
    ```
- Without the extension the package stays **dormant**: nothing is aliased, nothing breaks. The same is true when the real `phpoffice/phpspreadsheet`is installed — adoption can be incremental.

Install
-------

[](#install)

```
composer require easy-excel/polyfill
```

The published image also ships this package at `/opt/easy-excel/php`, usable as a path repository if you prefer pinning to the image:

```
{
    "repositories": [{ "type": "path", "url": "/opt/easy-excel/php" }],
    "require": { "easy-excel/polyfill": "*" }
}
```

Usage
-----

[](#usage)

Existing PhpSpreadsheet code works unchanged — the bootstrap lazily aliases `PhpOffice\PhpSpreadsheet\*` to the native-backed `EasyExcel\Compat\*`classes:

```
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\IOFactory;

$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();

// style first, then bulk-write: everything below streams at constant memory
$sheet->getStyle('A1:C1')->applyFromArray([
    'font' => ['bold' => true, 'color' => ['rgb' => 'FFFFFF']],
    'fill' => ['fillType' => 'solid', 'startColor' => ['rgb' => '4472C4']],
]);
$sheet->getStyle('B2:B100000')->getNumberFormat()->setFormatCode('#,##0.00');
$sheet->getColumnDimension('A')->setWidth(28);
$sheet->freezePane('A2');

$sheet->fromArray($hugeDataset);          // batched straight into Go
$sheet->setAutoFilter('A1:C100000');      // injected at save, still streaming

IOFactory::createWriter($spreadsheet, 'Xlsx')->save('report.xlsx');
$spreadsheet->disconnectWorksheets();     // frees the native workbook
```

Reading works the same way (`IOFactory::load`, `toArray`, `rangeToArray`, `getCalculatedValue` — formulas are evaluated by excelize's engine, 466/529 PhpSpreadsheet functions, [coverage table](https://github.com/xiidea/easy-excel/blob/main/FORMULAS.md)).

You can also use the `EasyExcel\Compat\*` classes directly, or the flat `EasyExcel\Native` ABI wrapper for maximum throughput. The raw extension functions work without this package at all — reference: [NATIVE.md](https://github.com/xiidea/easy-excel/blob/main/NATIVE.md).

What's covered
--------------

[](#whats-covered)

- **Workbook/worksheet**: create/load/save (Xlsx, Csv), sheet management, `setCellValue(+Explicit)`, `fromArray`/`toArray`/`rangeToArray`, dimensions
- **Styles**: font, fill, borders, alignment, protection, number formats — `applyFromArray` and the full `getStyle(range)` graph; styles applied before their rows are written ride the stream at zero cost
- **Structure**: column widths/auto-size, row heights, merged cells, auto-filter, freeze panes, hyperlinks, comments, defined names, page setup
- **Advanced**: data validation, conditional formatting, images, sheet protection, charts (native declarative API), formula evaluation
- **Load control**: heavy operations pass a semaphore + memory budget; overload surfaces as `EasyExcel\Exception\Overloaded` (map it to HTTP 429) instead of OOM-killing the worker

The precise matrix and every documented divergence: [COMPAT.md](https://github.com/xiidea/easy-excel/blob/main/COMPAT.md).

Configuration (environment)
---------------------------

[](#configuration-environment)

Env varDefaultMeaning`EASY_EXCEL_MAX_CONCURRENT``max(2, NumCPU)`heavy ops (open/save/scan) in flight`EASY_EXCEL_ACQUIRE_TIMEOUT_MS``30000`wait before `Overloaded` is raised`EASY_EXCEL_MEMORY_BUDGET_MB``512`live-workbook memory circuit breaker`EASY_EXCEL_ALLOWED_PATHS`unset (any local path)colon-separated base dirs for load/save`EASY_EXCEL_FORCE_ALIAS`unset`1` forces the aliases even when phpspreadsheet is installed (used by the test suite)Tests
-----

[](#tests)

```
composer test    # zero-dependency suite against an in-memory fake of the ABI
```

The end-to-end suite (real extension, Docker) runs in the [main repository's CI](https://github.com/xiidea/easy-excel/actions).

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.1% 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 ~0 days

Total

6

Last Release

42d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f7cc5359750f4e8cf854ddd35f5d9f752eb026d2f383e49a6ba2b4755db4da3?d=identicon)[xiidea](/maintainers/xiidea)

---

Top Contributors

[![ronisaha](https://avatars.githubusercontent.com/u/1433652?v=4)](https://github.com/ronisaha "ronisaha (20 commits)")[![saifulferoz](https://avatars.githubusercontent.com/u/15348453?v=4)](https://github.com/saifulferoz "saifulferoz (7 commits)")

### Embed Badge

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

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

###  Alternatives

[wapmorgan/php-code-analyzer

A program that finds usage of different non-built-in extensions in your php code.

96149.1k4](/packages/wapmorgan-php-code-analyzer)[zepgram/magento-dotenv

Simple autoloader to integrate the Symfony Dotenv component into Magento2

1376.0k](/packages/zepgram-magento-dotenv)[fsc/batch

Library with classes to help you do batch.

185.3k](/packages/fsc-batch)

PHPackages © 2026

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