What are the main differences between PHPExcel and PhpSpreadsheet?

simhumileco picture simhumileco · Dec 13, 2016 · Viewed 25.7k times · Source

In project of PHPOffice there are two projects associated with spreadsheet file formats:

PHPExcel

PHPExcel is a library written in pure PHP and providing a set of classes that allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP.

and

PhpSpreadsheets

PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.

What are the main differences between them?

Answer

Mark Baker picture Mark Baker · Dec 13, 2016

PHPExcel has been maintained as a library for working with spreadsheet files for many years now, and has been shackled by retaining support for older versions of PHP (>= 5.2) making it very difficult to move forward and improve it. It is a stable library, but will not be developed any further.

PHPSpreadsheet is the newest version of PHPExcel, and large parts of it have been rewritten to take advantage of the newer features of PHP. While retaining all the functionality of PHPExcel, it requires a minimum PHP version of 5.5 (and soon that will be dropped to require a minimum of 5.6).

The change in library name was to reflect the fact that it isn't limited to Excel spreadsheets; but supports a wider range of spreadsheet file formats.

EDIT 2020:

PHP Excel was officially deprecated in 2017 and permanently archived in 2019.

PHP Excel has not be maintained for years and must not be used anymore. All users must migrate to its direct successor PhpSpreadsheet, or another alternative.