2017 © Pedro Peláez
 

library phpspreadsheet

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

image

phpoffice/phpspreadsheet

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

  • Wednesday, July 25, 2018
  • by PowerKiKi
  • Repository
  • 231 Watchers
  • 3494 Stars
  • 1,336,360 Installations
  • PHP
  • 130 Dependents
  • 11 Suggesters
  • 580 Forks
  • 67 Open issues
  • 23 Versions
  • 65 % Grown

The README.md

PhpSpreadsheet

Build Status Code Quality Code Coverage Total Downloads Latest Stable Version License Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet, (*1)

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., (*2)

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., (*3)

Currently the required PHP minimum version is PHP 8.0, and we will support that version until May 2024., (*4)

See the composer.json for other requirements., (*5)

Installation

Use composer to install PhpSpreadsheet into your project:, (*6)

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:, (*7)

{
    "config": {
        "platform": {
            "php": "8.0"
        }
    }
}

and then run, (*8)

composer install

to ensure that the correct dependencies are retrieved to match your deployment environment., (*9)

See CLI vs Application run-time for more details., (*10)

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:, (*11)

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, (*12)

and configure PhpSpreadsheet using:, (*13)

// 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., (*14)

Chart Export

For Chart export, we support following packages, which you will also need to install yourself using composer require - jpgraph/jpgraph (this package was abandoned at version 4.0. You can manually download the latest version that supports PHP 8 and above from jpgraph.net) - mitoteam/jpgraph - up to date fork with modern PHP versions support and some bugs fixed., (*15)

and then configure PhpSpreadsheet using:, (*16)

// to use jpgraph/jpgraph
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
//or
// to use mitoteam/jpgraph
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class);

One or the other of these libraries is necessary if you want to generate HTML or PDF files that include charts; or to render a Chart to an Image format from within your code. They are not necessary to define charts for writing to Xlsx files. Other file formats don't support writing Charts., (*17)

Documentation

Read more about it, including install instructions, in the official documentation. Or check out the API documentation., (*18)

Please ask your support questions on StackOverflow, or have a quick chat on Gitter., (*19)

Patreon

I am now running a Patreon to support the work that I do on PhpSpreadsheet., (*20)

Supporters will receive access to articles about working with PhpSpreadsheet, and how to use some of its more advanced features., (*21)

Posts already available to Patreon supporters: - The Dating Game - A look at how MS Excel (and PhpSpreadsheet) handle date and time values. - Looping the Loop - Advice on Iterating through the rows and cells in a worksheet., (*22)

And for Patrons at levels actively using PhpSpreadsheet: - Behind the Mask - A look at Number Format Masks., (*23)

The Next Article (currently Work in Progress): - Formula for Success - How to debug formulae that don't produce the expected result., (*24)

My aim is to post at least one article each month, taking a detailed look at some feature of MS Excel and how to use that feature in PhpSpreadsheet, or on how to perform different activities in PhpSpreadsheet., (*25)

Planned posts for the future include topics like: - Tables - Structured References - AutoFiltering - Array Formulae - Conditional Formatting - Data Validation - Value Binders - Images - Charts, (*26)

After a period of six months exclusive to Patreon supporters, articles will be incorporated into the public documentation for the library., (*27)

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.)., (*28)

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., (*29)

Do you need to migrate? There is an automated tool for that., (*30)

License

PhpSpreadsheet is licensed under MIT., (*31)

The Versions

25/07 2018

dev-develop

dev-develop https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1 LGPL-2.1-or-later

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

25/07 2018

dev-complex

dev-complex https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

22/07 2018

dev-bitwise

dev-bitwise https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

22/07 2018

dev-new-functions

dev-new-functions https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

12/06 2018

dev-master

9999999-dev https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1 LGPL-2.1-or-later

The Requires

  • ext-mbstring *
  • ext-iconv *
  • ext-xml *
  • ext-xmlwriter *
  • php ^5.6|^7.0
  • ext-zip *
  • psr/simple-cache ^1.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-libxml *
  • ext-simplexml *
  • ext-xmlreader *
  • ext-zlib *

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

12/06 2018

1.3.1

1.3.1.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

10/06 2018

1.3.0

1.3.0.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

21/04 2018

dev-issue-332

dev-issue-332 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • php ^5.6|^7.0
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

10/04 2018

1.2.1

1.2.1.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

04/03 2018

1.2.0

1.2.0.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1-or-later

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

28/01 2018

1.1.0

1.1.0.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

28/01 2018

dev-debug_travis

dev-debug_travis https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

25/12 2017

1.0.0

1.0.0.0 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

26/11 2017

1.0.0-beta2

1.0.0.0-beta2 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

  • php ^5.6|^7.0
  • ext-ctype *
  • ext-dom *
  • ext-gd *
  • ext-iconv *
  • ext-libxml *
  • ext-mbstring *
  • ext-simplexml *
  • ext-xml *
  • ext-xmlreader *
  • ext-xmlwriter *
  • ext-zip *
  • ext-zlib *
  • psr/simple-cache ^1.0

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

17/08 2017

1.0.0-beta

1.0.0.0-beta https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

23/06 2017

dev-kifni41-feature/read_html_inline_css

dev-kifni41-feature/read_html_inline_css https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

20/06 2017

dev-MewesK-develop

dev-MewesK-develop https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

29/05 2017

dev-mit

dev-mit https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

MIT

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

23/05 2017

dev-titanrat-ubuntu+win10-test-fix

dev-titanrat-ubuntu+win10-test-fix https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

18/05 2017

dev-titanrat-global-use

dev-titanrat-global-use https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

07/05 2017

dev-azine-patch-1

dev-azine-patch-1 https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

20/04 2017

dev-lanthaler-infer-delimiter

dev-lanthaler-infer-delimiter https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric

14/04 2017

dev-cache

dev-cache https://github.com/PHPOffice/PhpSpreadsheet

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

  Sources   Download

LGPL-2.1

The Requires

 

The Development Requires

by Erik Tilt

php excel xls spreadsheet xlsx openxml ods gnumeric