PHPackages                             imtigger/oneexcel - 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. imtigger/oneexcel

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

imtigger/oneexcel
=================

PHP Excel read/write abstraction layer, support PhpSpreadSheet, LibXL, Spout and PHP fputcsv

v0.7.3(7y ago)729.2k4[1 PRs](https://github.com/imTigger/OneExcel/pulls)MITPHPPHP &gt;=5.6.4

Since Mar 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/imTigger/OneExcel)[ Packagist](https://packagist.org/packages/imtigger/oneexcel)[ Docs](https://github.com/imTigger/oneexcel)[ RSS](/packages/imtigger-oneexcel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (20)Used By (0)

OneExcel
========

[](#oneexcel)

[![Build Status](https://camo.githubusercontent.com/9785c64e4a86dcf66ac35bc030a5ad08d36a9351912c6a08cd0b57c169e6649d/68747470733a2f2f7472617669732d63692e6f72672f696d5469676765722f4f6e65457863656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/imTigger/OneExcel)[![Latest Stable Version](https://camo.githubusercontent.com/202337a03b0690ca71520576692a05793105431c2c8b9d0dbc9262c18250999e/68747470733a2f2f706f7365722e707567782e6f72672f696d7469676765722f6f6e65657863656c2f762f737461626c65)](https://packagist.org/packages/imtigger/oneexcel)[![Latest Unstable Version](https://camo.githubusercontent.com/d67030244e52e382c4dce6c0a1897df9faaa05f59b15ca7189993237b32f38ca/68747470733a2f2f706f7365722e707567782e6f72672f696d7469676765722f6f6e65657863656c2f762f756e737461626c65)](https://packagist.org/packages/imtigger/oneexcel)[![Total Downloads](https://camo.githubusercontent.com/c36f676e3a3be99f3a8535e13046e88d37954cbc16344517da308bc1a6f2f630/68747470733a2f2f706f7365722e707567782e6f72672f696d7469676765722f6f6e65657863656c2f646f776e6c6f616473)](https://packagist.org/packages/imtigger/oneexcel)[![License](https://camo.githubusercontent.com/69ed3c68774728d93c208c7fe877341140a254d5f6884c60102889a8edbd8de6/68747470733a2f2f706f7365722e707567782e6f72672f696d7469676765722f6f6e65657863656c2f6c6963656e7365)](https://packagist.org/packages/imtigger/oneexcel)

PHP Excel read/write abstraction layer, support [PhpSpreadSheet](https://github.com/PHPOffice/PhpSpreadSheet), [LibXL](https://github.com/iliaal/php_excel), [Spout](https://github.com/box/spout) and PHP `fputcsv`/`fgetcsv`

Targets to simplify server compatibility issue between Excel libraries and performance issue in huge files.

Ideal for simple-formatted but huge spreadsheet files such as reporting.

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP &gt;= 5.6.4
- `php_zip`, `php_xmlreader`, `php_simplexml` enabled
- (Recommended) LibXL installed &amp; `php_excel` enabled

### Composer

[](#composer)

OneExcel can only be installed from [Composer](https://getcomposer.org/).

Run the following command:

```
$ composer require imtigger/oneexcel

```

Writer
------

[](#writer)

### Basic Usage

[](#basic-usage)

```
$excel = OneExcelWriterFactory::create()
        ->toFile('excel.xlsx')
        ->make();

$excel->writeCell(1, 0, 'Hello');
$excel->writeCell(2, 1, 'World');
$excel->writeCell(3, 2, 3.141592653, ColumnType::NUMERIC);
$excel->writeRow(4, ['One', 'Excel']);
$excel->writeCell(4, 2, 'Test');

$excel->output();
```Selection](driver.md)

### Advanced Usage

```php
$excel = OneExcelWriterFactory::create()
        ->fromFile('template.xlsx', Format::XLSX)
        ->toStream('excel.csv', Format::CSV)
        ->withDriver(Driver::SPOUT)
        ->make();

$excel->writeCell(1, 0, 'Hello');
$excel->writeCell(2, 1, 'World');
$excel->writeCell(3, 2, 3.141592653, ColumnType::NUMERIC);
$excel->writeRow(4, ['One', 'Excel']);
$excel->writeCell(4, 2, 'Test');

$excel->output();
```

Reader
------

[](#reader)

(Version 0.6+)

```
$excel = OneExcelReaderFactory::create()
        ->fromFile('excel.xlsx')
        // ->withDriver(Driver::SPOUT)
        ->make();

foreach ($excel->row() as $row) {
    //
}

$excel->close();
```

Documents
---------

[](#documents)

[Auto Driver Selection](https://github.com/imTigger/OneExcel/wiki/Auto-Writer-Driver-Selection)

Known Issues
------------

[](#known-issues)

- Spout reader driver output empty rows as SINGLE column (Upstream problem?)
- Spout do not support random read/write rows (Upstream limitation, Won't fix)
- Spout do not support formula (Upstream limitation, Won't fix)
- fputcsv driver ignores all ColumnType::\* (File-type limitation, Won't fix)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.2% 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 ~46 days

Recently: every ~141 days

Total

18

Last Release

2568d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dccc21db276f7537d99558ba2a645a1cd5365188e7714f483661a8c07fa44d0a?d=identicon)[imtigger](/maintainers/imtigger)

---

Top Contributors

[![imTigger](https://avatars.githubusercontent.com/u/4729517?v=4)](https://github.com/imTigger "imTigger (124 commits)")[![atlas-wong](https://avatars.githubusercontent.com/u/29590700?v=4)](https://github.com/atlas-wong "atlas-wong (9 commits)")

---

Tags

csvexcellibxlodsphpphpexcelspoutxlsxlsxexcelxlsxlsxcsvodsPHPExcelspoutLibXLfputcsv

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/imtigger-oneexcel/health.svg)

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

###  Alternatives

[nuovo/spreadsheet-reader

Spreadsheet reader library for Excel, OpenOffice and structured text files

669863.2k8](/packages/nuovo-spreadsheet-reader)[dcat/easy-excel

使用简单实用的语义化接口快速读写Excel文件

155373.4k24](/packages/dcat-easy-excel)[jgrygierek/batch-entity-import-bundle

Importing entities with preview and edit features for Symfony.

101.1M1](/packages/jgrygierek-batch-entity-import-bundle)[jgrygierek/sonata-batch-entity-import-bundle

Importing entities with preview and edit features for Sonata Admin.

10951.2k](/packages/jgrygierek-sonata-batch-entity-import-bundle)[jianyan74/php-excel

php excel 导入导出

5842.2k4](/packages/jianyan74-php-excel)[onurb/excel-bundle

Symfony Bundle to read or write Excel file (including pdf, xlsx, odt), using phpoffice/phpspreadsheet library (replacement of phpoffice/phpexcel, abandonned)

15332.0k](/packages/onurb-excel-bundle)

PHPackages © 2026

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