PHPackages                             ecbc-phpoffice/phpspreadsheet - 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. ecbc-phpoffice/phpspreadsheet

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

ecbc-phpoffice/phpspreadsheet
=============================

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

1.24.0(3y ago)1298↓100%MITPHPPHP ^7.3 || ^8.0

Since Nov 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/julien-its/PhpSpreadsheet)[ Packagist](https://packagist.org/packages/ecbc-phpoffice/phpspreadsheet)[ Docs](https://github.com/PHPOffice/PhpSpreadsheet)[ RSS](/packages/ecbc-phpoffice-phpspreadsheet/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (18)Versions (2)Used By (0)

PhpSpreadsheet
==============

[](#phpspreadsheet)

[![Build Status](https://github.com/PHPOffice/PhpSpreadsheet/workflows/main/badge.svg)](https://github.com/PHPOffice/PhpSpreadsheet/actions)[![Code Quality](https://camo.githubusercontent.com/0f560c9a2fd1033f1c32357e8746dd50038fc275ee95ee88475ffaa41cc94d9f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/07904fb397758659ced0b0f4bd414c2bda0a2ab1045dc57952fea097e0e031c1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5048504f66666963652f50687053707265616473686565742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/3a320549c951c98924a7de48782f9ef428e3446569bde9986d3e01315ac41475/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f5048504f66666963652f5068705370726561647368656574)](https://packagist.org/packages/phpoffice/phpspreadsheet)[![Latest Stable Version](https://camo.githubusercontent.com/8b8351e3041183c5877cfeb8a681a3280d883fb3405deae5755f91646f34ea91/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f5048504f66666963652f5068705370726561647368656574)](https://packagist.org/packages/phpoffice/phpspreadsheet)[![License](https://camo.githubusercontent.com/264867c05bb4d83e2c7afe8cb54894071fea51ee99faf6c336586b03778c965a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f5048504f66666963652f5068705370726561647368656574)](https://packagist.org/packages/phpoffice/phpspreadsheet)[![Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet](https://camo.githubusercontent.com/2dd4d0f228a76b3dd73355d3fb9101cd32fb849421b528669a9a7bbec7d5a25a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4749545445522d6a6f696e253230636861742d677265656e2e737667)](https://gitter.im/PHPOffice/PhpSpreadsheet)

PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.

PHP version support
-------------------

[](#php-version-support)

LTS: Support for PHP versions will only be maintained for a period of six months beyond the [end of life of that PHP version](https://www.php.net/eol.php).

Currently the required PHP minimum version is PHP **7.3**.

See the `composer.json` for other requirements.

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

[](#installation)

Use [composer](https://getcomposer.org) to install PhpSpreadsheet into your project:

```
composer require phpoffice/phpspreadsheet
```

If you are building your installation on a development machine that is on a different PHP version to the server where it will be deployed, or if your PHP CLI version is not the same as your run-time such as `php-fpm` or Apache's `mod_php`, then you might want to add the following to your `composer.json` before installing:

```
{
    "require": {
        "phpoffice/phpspreadsheet": "^1.23"
    },
    "config": {
        "platform": {
            "php": "7.3"
        }
    }
}
```

and then run

```
composer install
```

to ensure that the correct dependencies are retrieved to match your deployment environment.

See [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details.

### Additional Installation Options

[](#additional-installation-options)

If you want to write to PDF, or to include Charts when you write to HTML or PDF, then you will need to install additional libraries:

#### PDF

[](#pdf)

For PDF Generation, you can install any of the following, and then configure PhpSpreadsheet to indicate which library you are going to use:

- mpdf/mpdf
- dompdf/dompdf
- tecnickcom/tcpdf

and configure PhpSpreadsheet using:

```
// Dompdf, Mpdf or Tcpdf (as appropriate)
$className = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class;
IOFactory::registerWriter('Pdf', $className);
```

or the appropriate PDF Writer wrapper for the library that you have chosen to install.

#### Chart Export

[](#chart-export)

For Chart export, we support, which you will also need to install yourself

- jpgraph/jpgraph

and then configure PhpSpreadsheet using:

```
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
```

You can `composer/require` the github version of jpgraph, but this was abandoned at version 4.0; or manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/)

Documentation
-------------

[](#documentation)

Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).

Please ask your support questions on [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet), or have a quick chat on [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet).

PHPExcel vs PhpSpreadsheet ?
----------------------------

[](#phpexcel-vs-phpspreadsheet-)

PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).

Because all efforts have shifted to PhpSpreadsheet, PHPExcel will no longer be maintained. All contributions for PHPExcel, patches and new features, should target PhpSpreadsheet `master` branch.

Do you need to migrate? There is [an automated tool](/docs/topics/migration-from-PHPExcel.md) for that.

License
-------

[](#license)

PhpSpreadsheet is licensed under [MIT](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/LICENSE).

###  Health Score

25

—

LowBetter than 39% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

1231d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11e48f522a95c1d03bc0e1b3b9a2df83818c7f2db013f6c93b70f82209bee1d9?d=identicon)[julien-its](/maintainers/julien-its)

---

Top Contributors

[![julien-its](https://avatars.githubusercontent.com/u/28753001?v=4)](https://github.com/julien-its "julien-its (5 commits)")

---

Tags

phpexcelxlsxlsxOpenXMLspreadsheetodsgnumeric

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ecbc-phpoffice-phpspreadsheet/health.svg)

```
[![Health](https://phpackages.com/badges/ecbc-phpoffice-phpspreadsheet/health.svg)](https://phpackages.com/packages/ecbc-phpoffice-phpspreadsheet)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k286.2M1.1k](/packages/phpoffice-phpspreadsheet)

PHPackages © 2026

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