PHPackages                             plumphp/plum-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. plumphp/plum-excel

ActiveLibrary

plumphp/plum-excel
==================

v0.3(10y ago)34.8k11PHPPHP &gt;=5.5

Since Apr 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/plumphp/plum-excel)[ Packagist](https://packagist.org/packages/plumphp/plum-excel)[ RSS](/packages/plumphp-plum-excel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (8)Used By (1)

 [![Plum](https://camo.githubusercontent.com/a81342cbfd6f64a484988488ad37bbd0e665d0f14f65ec655ae986097447bfb6/687474703a2f2f63646e2e666c6f7269616e2e65632f706c756d2d6c6f676f2e737667)](https://camo.githubusercontent.com/a81342cbfd6f64a484988488ad37bbd0e665d0f14f65ec655ae986097447bfb6/687474703a2f2f63646e2e666c6f7269616e2e65632f706c756d2d6c6f676f2e737667)
==================================================================================================================================================================================================================================================================================================================================================================

[](#----)

> PlumExcel includes readers and writers for Microsoft Excel files for Plum. Plum is a data processing pipeline for PHP.

[![Build Status](https://camo.githubusercontent.com/a19fa276a700a48e27b48605ff181238932c61a682a8800732812777333620cc/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f706c756d7068702f706c756d2d657863656c2e7376673f7374796c653d666c6174)](https://travis-ci.org/plumphp/plum-excel)[![Windows Build status](https://camo.githubusercontent.com/bfb39f00b0d3d9a9a8a3b374bceb5897f97a886adba05c1b0af5ef513fc4b3f8/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f383335747076696d38686239383665663f7376673d74727565)](https://ci.appveyor.com/project/florianeckerstorfer/plum-excel)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1c9a88d309bed95e8ff758d76592e278e2df8d8709d386342544e8b31a447033/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f706c756d7068702f706c756d2d657863656c2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/plumphp/plum-excel/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ffd69e0648ed4539fa4a4efec1de3bf068819822b25eaac522be3ff310941fd4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f706c756d7068702f706c756d2d657863656c2e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/plumphp/plum-excel/?branch=master)[![StyleCI](https://camo.githubusercontent.com/49e4128695815bc371fbbc20876a33fd6d1262886053749f128928cdc2ba0d82/68747470733a2f2f7374796c6563692e696f2f7265706f732f33313630383534332f736869656c64)](https://styleci.io/repos/31608543)

Developed by [Florian Eckerstorfer](https://florian.ec) in Vienna, Europe.

Features
--------

[](#features)

- Read Microsoft Excel (`.xlsx` and `.xls`) files
- Write Microsoft Excel (`.xlsx` and `.xls`) files
- Uses [PHPExcel](https://github.com/PHPOffice/PHPExcel)

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

[](#installation)

You can install `plum-excel` using [Composer](http://getcomposer.org).

```
$ composer require plumphp/plum-excel
```

Usage
-----

[](#usage)

PlumExcel contains a reader and a writer for Plum. Please refer to the [Plum documentation](https://github.com/plumphp/plum/blob/master/docs/index.md) for more information about Plum.

You can also find examples of how to use `ExcelReader` and `ExcelWriter` in the [`examples/`](https://github.com/plumphp/plum-excel/tree/master/examples) folder.

### Write Excel files

[](#write-excel-files)

Writing Excel files is extremely simply. Just pass the filename of the file to the constructor. If you want to add a header row call the `autoDetectHeader()` method.

```
use Plum\PlumExcel\ExcelWriter;

$writer = new ExcelWriter(__DIR__.'/example.xlsx');
$writer->autoDetectHeader();
```

You can manually set the header names by calling the `setHeader()` method and passing an array with names.

```
$writer->setHeader(['Country Name', 'ISO 3166-1-alpha-2 code']);
```

However, if you want more control, you can also pass an instance of `PHPExcel` to the constructor and the format (`Excel2007` or `Excel5`) or an implementation of `PHPExcel_Writer_IWriter`.

```
$writer = new ExcelWriter(__DIR__.'/example.xlsx', $excel, 'Excel2007', $writer);
```

### Read Excel files

[](#read-excel-files)

Reading Excel files is also pretty simple.

```
use Plum\PlumExcel\ExcelReader;

$reader = new ExcelReader(__DIR__.'/example.xlsx');
```

Instead of a filename you can also pass an instance of `PHPExcel` to the constructor.

```
use Plum\PlumExcel\ExcelReader;

$excel = PHPExcel_IOFactory::load(__DIR__.'/example.xlsx');
$reader = new ExcelReader($excel);
```

Plum can automatically detect the headers by using `Plum\Plum\Converter\HeaderConverter`.

```
use Plum\Plum\Converter\HeaderConverter;
use Plum\Plum\Filter\SkipFirstFilter;
use Plum\PlumExcel\ExcelReader;

$workflow->addConverter(new HeaderConverter());
$workflow->addFilter(new SkipFirstFilter(1));
$workflow->process(new ExcelReader($filename));
```

Change Log
----------

[](#change-log)

### Version 0.3 (24 October 2015)

[](#version-03-24-october-2015)

- [\#2](https://github.com/plumphp/plum-excel/pull/2) Handle items that are not arrays

### Version 0.2.1 (28 April 2015)

[](#version-021-28-april-2015)

- Fix Plum version

### Version 0.2 (22 April 2015)

[](#version-02-22-april-2015)

- `ExcelReader` supports filename as input
- Add support for `Plum\Plum\Reader\ReaderFactory`

### Version 0.1 (21 April 2015)

[](#version-01-21-april-2015)

- Initial release

License
-------

[](#license)

The MIT license applies to plumphp/plum-excel. For the full copyright and license information, please view the LICENSE file distributed with this source code.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~31 days

Recently: every ~46 days

Total

7

Last Release

3859d ago

### Community

Maintainers

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

---

Top Contributors

[![florianeckerstorfer](https://avatars.githubusercontent.com/u/149201?v=4)](https://github.com/florianeckerstorfer "florianeckerstorfer (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[liuggio/excelbundle

This is a Symfony2 Bundle helps you to read and write Excel files (including pdf, xlsx, odt), thanks to the PHPExcel library

3776.4M10](/packages/liuggio-excelbundle)[plumphp/plum

Plum is a data processing pipeline that helps you to write structured, reusable and well tested data processing code.

14088.8k17](/packages/plumphp-plum)[wisembly/excelant

72158.3k](/packages/wisembly-excelant)[arogachev/yii2-excel

ActiveRecord import and export based on PHPExcel for Yii 2 framework

6480.3k1](/packages/arogachev-yii2-excel)[archon/dataframe

Archon: PHP Data Analysis Library

9824.2k1](/packages/archon-dataframe)[portphp/excel

Excel reader and writer for Port

26259.9k](/packages/portphp-excel)

PHPackages © 2026

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