NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #156 most downloaded on Packagist
PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
Latest stable
5.12.0
Last release today
22 Nov 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
155 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Psalm taint analysis annotations: the files read and written are file sinks, and cell values are untrusted input. PR #5070
#N/A or #DIV/0!; every error constant was written as #NULL!. Issue #5022 PR #5067XLOOKUP() without an if_not_found argument returns a real #N/A error when nothing matches, instead of the string #N/A!, so ISNA(), ISERROR() and IFNA() handle it. Issue #5085 PR #5095#REF!, as Excel does. Issue #792 PR #5077SEARCH() treats ? and * in the text to find as wildcards, and ~ as escaping them, as Excel does; they were matched literally. Issue #5075 PR #5076Your coding agent can read these notes before it upgrades. Set up the MCP server →
Deprecate _calculateFormulaValue for calculateFormulaValue . PR #4992
/TH; Ods Reader reads a named database range back as a table (the anonymous range LibreOffice keeps for the filter of a sheet stays that sheet's autofilter), and an autofilter now lands on the sheet its range names. Issue #5022 PR #5023phpoffice/wmf library: Xlsx Writer stores them as is, Ods, Xls, Html and Pdf Writers and comment backgrounds use a PNG rendering; Xlsx and Ods Writers can switch with setConvertMetafilesToPng() (new in BaseWriter), and MemoryDrawing::fromString() / fromStream() accept them. New methods Drawing::isMetafile() and Drawing::getMetafileType(), and new helper Shared\Metafile.Document\Properties::setLanguage(): the language of a spreadsheet as a BCP 47 tag, written and read as dc:language in Xlsx and Ods; the Ods writer also gives it to the default cell style, where LibreOffice keeps a spreadsheet's language, as LibreOffice writes it (the Western, Asian or complex slot by script, and style:rfc-language-tag for a tag with more than a language and a country), and the Ods reader reads it from there when there is no dc:language. Html writes and reads it as the lang of the html element. Issue #5040 PR #5041Chart::setDescription() is the alternative text of a chart, written as descr of the chart's frame and read back, and the frame takes the chart's name; LibreOffice exports it as /Alt of the chart in a tagged PDF. Issue #5038 PR #5039BaseDrawing::setDecorative() marks an image as decorative. Xlsx writes and reads it as Excel and LibreOffice do (adec:decorative in the image's cNvPr), Ods as LibreOffice does (loext:decorative in the frame's graphic style, which the writer now defines; the reader also takes ODF 1.4's draw:decorative); LibreOffice then leaves the image out of a tagged PDF as an artifact. Html writes and reads it as an empty alt. Issue #5036 PR #5037alt on the VML shape as Excel writes it. Issue #5056 PR #5057phpoffice/wmf is a new required dependency, used to render Windows Metafiles images.Drawing::UNSUPPORTED_IMAGE_TYPE_MESSAGE)._calculateFormulaValue for calculateFormulaValue. PR #4992333333) no longer makes the palette look full, so later custom colors are no longer written as black. Issue #5065 PR #5066RIGHT() returns all of the text when the number of characters requested is greater than its length. PR #5044=""<75 is FALSE. PR #5004VALUE() no longer treats product-like text such as 5V 2.1A - EU Wall Adaptor as a date serial. Issue #4996 PR #4997style:writing-mode="rl-tb", and Ods Reader reads it back; the direction was lost both ways. Issue #5015 PR #5016#Sheet.A1, as ODF and LibreOffice do, and Ods Reader reads that form back as sheet://Sheet!A1, so a Xlsx saved from it no longer gets a broken location. Issue #5011 PR #5012svg:desc and read back, so that LibreOffice exports it as the alternative text of the figure. Issue #5009 PR #5010preferHyperlinkToLabel) no longer add an empty hyperlink to every cell they write, which made a later Xlsx save throw "Invalid parameters passed." Issue #5007 PR #5008 PR #5021style:hyperlink in style:table-cell-properties), as it writes a link from a Xlsx file. Issue #5017 PR #5018removeColumn() no longer throws "Invalid column index 0" when it removes column A and every column up to the highest data column, e.g. removeColumn('A') on an empty sheet. Issue #5049 PR #5050removeColumn() and removeRow() take the removed columns/rows out of data validation ranges: a validation that lies only on them is deleted, and a range that ends on them shrinks, instead of covering the column/row that slides into their place. Issue #5047 PR #50481/1 with 0/0, and when the last numerator placeholder is 0, so 1 is 1 0/1 with 0 0/0, as Excel does. Issue #3625 PR #5060Worksheet no longer exists. Issue #5058 PR #5059Call to a member function getBlipType() on null). Issue #274MemoryDrawing); they were ignored. Issue #274image/x-wmf and image/x-emf instead of application/octet-stream, and Ods Writer does the same in its manifest when it stores them as is.Column::setTotalsRowFormula()), written as totalsRowFormula with totalsRowFunction="custom"; before it was dropped. The totals row label, function (as SUBTOTAL) or formula of a column also sets its totals row cell when that cell is empty, so it no longer has to be set by hand. Issue #5063 PR #5064getDataValidation() and dataValidationExists() no longer throw "Cell coordinate string can not be a range of cells" for a range once a validation on a range exists; a range gets the validation set on exactly that range, or a new one. Issue #5073 PR #5074@ treat a backslash as an escape character, as Excel does, so @\X displays Test as TestX instead of Test\X; backslashes in the text itself are kept. Issue #5069 PR #5071XLSX password-to-open encryption and decryption using Office Agile encryption. Issue #3878 PR #4975 PR #4988
Worksheet\PivotTable\PivotTable objects (name, location, source cache definition, and row/column/page/data field layout), accessible via Worksheet::getPivotTableCollection() / getPivotTableByName(). Pivot tables (their tables, caches and records) are now also preserved through an Xlsx load/save round-trip instead of being silently dropped. Issue #4534Worksheet::getStyle() on every Cell::setValueExplicit() unless quote-prefix must change. On a dense 40k-cell populate+save microbenchmark this cut wall time by ~5%. PR #4958="THIS IS E1" is written unchanged instead of as ="THIS IS [.E1]". Issue #4454 PR #4962Drop support for PHP 8.1, according to our published guidelines. PR #4907
Last version with support for Php 8.1.
Last version with support for Php 8.1.
Work around Php8.6 deprecation in mpdf/mpdf. PR #4878
This will probably be the last release on the master branch that supports Php8.1.
### Fixed - Security patches.
Make Reader/Csv Extendable, add new preferred Reader/CsvNoEscape class. Issue #4836 PR #4837 PR #4845
Much improved handling of Styles by Ods Reader. The relevant changes are listed at the end of the "Fixed" section below.
Store image in cell (Xlsx only). Issue #4014 Issue #4034 Issue #913 PR #4677
kx and ky. PR #4770$dataType, the second parameter of Cell::setValueExplicit, is currently optional. Omitting it is deprecated, and it will be required in a future relea…
INFO function. PR #4709BAHTTEXT function. PR #4715This release should be usable with Php8.5 Release Candidates without deprecation messages.
__wakeup with __unserialize, and eliminate the other. PR #4639Remove deprecated imagedestroy call. PR #4625
Deletion of items deprecated in Release 4. See "removed" below.
$reader->setAllowExternalImages(true). We do not believe that loading of external images is a widely used feature.Add to all readers the option to allow or forbid fetching external images. This is unconditionally allowed now. The default will be set to "allow", so
VSTACK and HSTACK. Issue #4485 PR #4492
Regression in Date::stringToExcel. Issue #4488 PR #4489
Xml Reader recognize indents. Issue #4448 PR #4449
Add ability to add custom functions to Calculation. PR #4390
Support Justify Last Line. Issue #4374 PR #4373
Deletion of items deprecated in Release 3. See "removed" below.
setTestAutoDetect(true), and it will not be possible at all with Php9+. Issue #4092 PR #4340setBetterBoolean(false). PR #4340forceFullCalc. This affects writes with preCalculateFormulas set to false. Prior behavior can be explicitly enabled via setForceFullCalc(null).PR #4340Security patches will continue to be applied to this branch until 2026-12-15. At that date, no further changes, including security patches, will be ap
Security patches will continue to be applied to this branch
until 2026-12-15. At that date, no further changes,
including security patches, will be applied.
You are encouraged to upgrade to the master branch (release 5)
before that date.
Security patches will continue to be applied to this branch until 2026-12-15. At that date, no further changes, including security patches, will be ap
Security patches will continue to be applied to this branch
until 2026-12-15. At that date, no further changes,
including security patches, will be applied.
You are encouraged to upgrade to the master branch (release 5)
before that date.
Fixed Security patches.
### Fixed - Security patches.
Php 8.6 deprecation in Mpdf. Backport of PR #4878
### Fixed - Security patches.
Option to whitelist external images. Security-related backport of PR #4793
Evaluation of WEBSERVICE no longer requires external client, but will use oldCalculatedValue unless the request is for a domain in a user-supplied whi
Php8.5 deprecates use of null as array index. PR #4636
Undefined array key "x"'. Issue #4668 PR #4679 Backport of PR #4669Option for Readers to create a new blank sheet if none match LoadSheetsOnly list. PR #4623 Backport of PR #4618.
Images will be loaded from an external source (e.g. http://example.com/img.png) only if the reader is explicitly set to allow it via $reader->setAllow
$reader->setAllowExternalImages(true). We do not believe that loading of external images is a widely used feature. This is a necessary change for security purposes. It unfortunately breaks Semantic Versioning for reasons described above; there is no way to start a new major version for this branch.Add to all readers the option to allow or forbid fetching external images. This is unconditionally allowed now. The default will be set to "allow", so
Allow php-cs-fixer to Handle Implicit Backslashes.
Xls writer Parser Mishandling True/False Argument. Backport of PR #4333
Methods to get style for row or column. PR #4317
CHOOSECOLS, CHOOSEROWS, DROP, TAKE, and EXPAND. PR #4286
Drawing::setIsUrl is unneeded. The property is set when setPath determines whether path is a url.
Html Reader/Writer Better Handling of Booleans. PR #4257
Settings::libXmlLoaderOptions is ignored. PR #4233
<s> tag when converting HTML to RichText. Issue #4223 PR #4224Worksheet::getProtectedCells was deprecated in release 2, but was not properly documented, and not removed in release 3. Use getProtectedCellRanges in…
The following items were deprecated in release 2 and are now removed.
This should have been a 3.0.0, but a typo was made when releasing. This has no technical impact and will stay as-is.
Deprecation annotation added to Spreadsheet class.
Although I had hoped to maintain this branch a little longer,
the volume of AI-generated security advisories has made it impossible to maintain branches other than master.
After this release, no further changes,
including security patches, will be applied to this branch.
You are encouraged to upgrade to the master branch (release 5)
as soon as possible.
This Branch Is Now Out Of Support
Although I had hoped to maintain this branch a little longer,
the volume of AI-generated security advisories has made it impossible to maintain branches other than master.
After this release, no further changes,
including security patches, will be applied to this branch.
You are encouraged to upgrade to the master branch (release 5)
as soon as possible.
Security patches will continue to be applied to this branch until 2027-02-28. At that date, no further changes, including security patches, will be ap
Security patches will continue to be applied to this branch
until 2027-02-28. At that date, no further changes,
including security patches, will be applied.
You are encouraged to upgrade to the master branch (release 5)
before that date.
### Fixed - Security patches.
Php 8.6 deprecation in Mpdf. Backport of PR #4878
### Fixed - Security patches.
Option to whitelist external images. Security-related backport of PR #4793
Evaluation of WEBSERVICE no longer requires external client, but will use oldCalculatedValue unless the request is for a domain in a user-supplied whi
Php8.5 deprecates use of null as array index. PR #4635
Option for Readers to create a new blank sheet if none match LoadSheetsOnly list. PR #4622 Backport of PR #4618.
Images will be loaded from an external source (e.g. http://example.com/img.png) only if the reader is explicitly set to allow it via $reader->setAllow
$reader->setAllowExternalImages(true). We do not believe that loading of external images is a widely used feature. This is a necessary change for security purposes. It unfortunately breaks Semantic Versioning for reasons described above; there is no way to start a new major version for this branch.Add to all readers the option to allow or forbid fetching external images. This is unconditionally allowed now. The default will be set to "allow", so
Allow php-cs-fixer to Handle Implicit Backslashes.
Xls writer Parser Mishandling True/False Argument. Backport of PR #4333
Backported security patch for control characters in protocol.
Worksheet::getHashCode is no longer needed.
Drawing::setIsUrl is unneeded. The property is set when setPath determines whether path is a url.
Fix Minor Break Handling Drawings. Backport of PR #4244
One column per quarter.