NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #2783 most downloaded on Packagist
Lightweight and very fast XLSX Excel Spreadsheet Writer in PHP
Latest stable
v6.20.0
Last release 15 days ago
07 Nov 2026
Release timing varies
gaps range from 1 weeks to 3 months
Most releases are documented
notes for 36 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
107 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
Version 6.20.0 improves automatic column width calculation and adds a custom display formatter. PHP 7.4 remains supported.
Version 6.20.0 improves automatic column width calculation and adds a custom display formatter. PHP 7.4 remains supported.
[$-419] and [$-409] are currently classified as numeric. For these masks, pass Excel serial dates rather than Unix timestamps.Full changelog: https://github.com/aVadim483/fast-excel-writer/compare/v6.19.2...v6.20.0
GitHub Actions passed for the release commit: https://github.com/aVadim483/fast-excel-writer/actions/runs/42317249740
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Version 6.19.2 fixes data loss and broken streaming when row writing is combined with border formatting or explicit positioning. It replaces the v6.19
Version 6.19.2 fixes data loss and broken streaming when row writing is combined with border formatting or explicit positioning. It replaces the v6.19.1 release publication and includes its consistent range border method names.
withRange()->applyBorderBottom() with writeRow() could produce empty styled rows or lose later data rows.setTopLeftCell() now flushes preceding rows. Repositioning before each writeRow() no longer accumulates all rows in memory, and flushed rows cannot be edited afterward.border-bottom-style and border-bottom-color now work in style arrays, including the second argument of writeRow(). Nested border options remain supported.foreach ($data as $row) {
$sheet->writeRow($row)->applyBorderBottom(Style::BORDER_DOTTED);
}
See #144.
applyBorderOuter() and applyBorderInner() are the primary range border method names on Sheet and buffered Area objects.applyOuterBorder() and applyInnerBorder() remain supported aliases; no migration is required.PHP 7.4 remains supported.
GitHub Actions passed for the release commit: https://github.com/aVadim483/fast-excel-writer/actions/runs/37822350015
writeRow() (#144)setTopLeftCell() now flushes preceding rows instead of accumulating them in memoryborder-bottom-style and border-bottom-color in style arraysMade applyBorderOuter() and applyBorderInner() the primary range border methods; applyOuterBorder() and applyInnerBorder() remain supported aliases
applyBorderOuter() and applyBorderInner() the primary range border methods; applyOuterBorder() and applyInnerBorder() remain supported aliasesArea annotations, documentation and demos to use the primary border method names; added regression tests for both names on cells and rangesVersion 6.19.0 adds explicit none colors throughout the styling APIs and fixes the documented border method names.
Version 6.19.0 adds explicit none colors throughout the styling APIs and fixes the documented border method names.
none colors, with surrounding whitespace ignored, in cell styles, rich text, sheet tabs, notes, conditional formatting and charts.applyFillColor('none'), applyBgColor('none'), Style::setFillColor('none') and [Style::FILL_COLOR => 'none'] remove cell fills, including previously applied patterns or gradients (#145).none.Properties implementation.applyOuterBorder() and applyInnerBorder() methods and includes an example of horizontal internal borders (#144). Both English and Russian documentation have been updated..gitattributes with export-ignore for tests, CI configuration, .gitignore and .gitattributes itself. These files remain in the repository but are excluded from distribution archives (#147).PHP 7.4 remains supported.
Added case-insensitive none colors across cell styles, rich text, sheet tabs, notes, conditional formatting and charts; serialize absent colors without empty RGB attributes
Fixed chart shadow property access from the shared Properties implementation
Fixed documented border method names and added examples for horizontal internal borders (#144) and removing cell fills (#145)
Added .gitattributes to exclude tests, CI configuration and Git metadata files from distribution archives (#147)
Rich text now supports subscript, superscript, strikethrough, explicit formatting overrides and fractional font sizes. Row sources can be streamed dir
Rich text now supports subscript, superscript, strikethrough, explicit formatting overrides and fractional font sizes. Row sources can be streamed directly from generators with Sheet::writeIterable().
Sheet::writeIterable() consumes arrays, generators and Traversable row sources without collecting them in memory. The existing writeRows() signature is unchanged.<sub> / <sup> tags and setSubscript(), setSuperscript(), setBaseline() methods (#143).RichText::setStrike() and nested <strike> / <del> tags.setBold(), setItalic() and setStrike(), plus removeUnderline().setSize(10.5) and <s=10.5> / <size=10.5> tags._xlnm._FilterDatabase defined name.addText() and RichTextFragment now accept literal text and escape it automatically. Remove manual htmlspecialchars() calls before passing text or font names to these APIs. For example, pass A & B, not A & B.addTaggedText() decode XML entities once and interpret supported tags. Unknown tags are preserved as literal text.setUnderline(false) still means single underline; use removeUnderline() to disable it.setSize(float $size).See the upgrade guide for details. PHP 7.4 remains supported.
The full local test suite passed on PHP 7.4 and PHP 8.3: 93 tests, 979 assertions on each version. External Excel/VBScript automation was disabled; XLSX XML validation and round-trip checks ran normally.
Fixed XML escaping of rich text and font names, including control characters in cell text and notes; addText() accepts literal text, while tagged input decodes XML entities once (see the upgrade guide)
Added explicit enable/disable arguments to rich text setBold(), setItalic() and setStrike(), plus removeUnderline()
Added fractional rich text font sizes through setSize(float $size) and size tags, with validation of positive finite values
Added Sheet::writeIterable() to consume arrays, generators and traversable row sources without collecting them in memory; writeRows() keeps its existing signature
Added RichText::setStrike() and nested <strike> / <del> tags
Fixed reversed single/double underline selection in RichTextFragment::setUnderline()
Fixed disabling an autofilter leaving a stale _xlnm._FilterDatabase defined name
Fixed invalid workbook XML when sheet names contain XML special characters such as & or < and are referenced by an autofilter, a named range, a print area or print titles, see https://github.com/aVadim483/fast-excel-writer/issues/142
Added subscript and superscript rich text through <sub> / <sup> tags and setSubscript(), setSuperscript(), setBaseline() methods, see https://github.com/aVadim483/fast-excel-writer/issues/143
Rich text tags now restore nested formatting and correctly handle font size tags; changes to fragments are reflected in subsequent XML serialization
The hidden attribute of a column and a row was treated as a flag, not as a value of xs:boolean type. Excel writes it as 0/1, but LibreOffice writes fa
hidden attribute of a column and a row was treated as a flag, not as a value of xs:boolean type. Excel writes it as 0/1, but LibreOffice writes false/true, and the string 'false' is truthy in PHP, so the check !empty($attributes['hidden']) turned a visible column into a hidden one. A template made or edited in LibreOffice was saved with all its columns hidden, see #140hidden resolves to false gets the default width again – the attribute is removed now instead of being written as hidden="0", which used to suppress the widthSheet::setColVisible($col, true) raised an Undefined array key warning on PHP 8 when the column had no attributes yethidden attribute of a column and a row being treated as a flag, not as xs:boolean – hidden="false", as LibreOffice writes it, was read as "hidden", so visible columns of such a template became hidden in the saved file, see https://github.com/aVadim483/fast-excel-writer/issues/140Shared state between workbooks – with two workbooks open in one process the number formats of the locale (@money, @DATETIME, …) and the default font o
@money, @DATETIME, …) and the default font of the workbook created last were applied to the other one, so a report could be saved with a foreign currency or date format. StyleManager kept a reference to itself in a static property and the static normalizeFont() / numberFormatStandardized() read the state from there. There was no workaround: unset() of the foreign workbook did not help, the static property held it aliveSheet::_writeRow() kept the cache of cell styles in a static variable common to all sheets of all workbooks. Because the current row is flushed lazily, writing into two workbooks alternately gave the cells of one of them the style indexes of the other, which silently lost their formats=R[-4]C[-1] written to B2) was written to the file as is, and Excel refused to open such a file. It becomes #REF! now, the way Excel does it:, so =SUM(R[-4]C[-1]:RC[-1]) could produce a hybrid like SUM(R[-4]C[-1]:A2). A range is captured as a whole nowStyleManager::normalizeFont() takes an optional second argument – the style manager whose default font is used as the base. The old signature keeps working (the last created workbook is used then), but a caller that knows its own manager should pass itStyleManager::numberFormatStandardized() became a method of the instance (it was private static)=R[-4]C[-1] written to B2) was written as is, and Excel refused to open such a file; now it becomes #REF!, as Excel does=SUM(R[-4]C[-1]:RC[-1]) produced a hybrid like SUM(R[-4]C[-1]:A2), now the range is converted as a whole@money, @DATETIME, etc.) of the last created one won, so a report could be saved with a foreign currency; the same applied to the default fontThe cell type of a pre-calculated formula result – a text result was written without t="str", so Excel treated it as a number and showed #VALUE!; bool
t="str", so Excel treated it as a number and showed #VALUE!; boolean and error results are now written as t="b"/t="e" too (#139)null pre-calculated result (['=A1+B1', null]) – the cell was written empty and the formula was lost; now it is written without a cached value, so Excel calculates it on openWriter prevented garbage collection – it registered [$this, 'removeFiles'] as a shutdown function, which held a global reference to every instance, so the destructor never ran and memory grew in long-running/CLI processes (#138)null pre-calculated result (['=A1+B1', null]) – the whole cell was written empty and the formula was lostt="str", so Excel treated it as a number and showed #VALUE!; boolean and error results are now written as t="b"/t="e" too, see https://github.com/aVadim483/fast-excel-writer/issues/139Writer preventing garbage collection – it registered [$this, 'removeFiles'] as a shutdown function, which held a global reference to every instance, so the destructor never ran and memory grew in long-running/CLI processes, see https://github.com/aVadim483/fast-excel-writer/issues/138PHP 8.1+ deprecations from strtolower()/htmlspecialchars() on non-string arguments
Style object can be created directly from an options array – new Style($options)Excel::getSharedStringsRefCount()DataValidation/Conditional objects – applying one object to several ranges kept only the last range (#137)Sheet::setStateVeryHidden() made the sheet visible instead of very hiddenSheet::writeCell() rejected the last valid row (1048576) and column (XFD)Excel::rangeDimensionRelative() collapsed a range given as two associative points to a single cellxmlSpecialChars() now uses ENT_SUBSTITUTE)LC_NUMERIC locale (e.g. de_DE) on PHP 7.4 produced invalid <v>3,14</v>StyleManager read default-font state from the wrong instance)sheetN.xml after removeSheet() + makeSheet()Sheet::writeCells() dropped positional (integer-keyed) cell styles"" and national function names containing regex metacharactersxml:space="preserve")Area::getOffsetAddress() ignored its offset argumentSheet::skipRow(null) skipped no rowsstrtolower()/htmlspecialchars() on non-string argumentsZipArchive handle was not closed if saving threw an exceptionExcel::download() strips CR/LF and quotes from the file name (header injection), sends the correct xlsx MIME type, adds an RFC 5987 filename* and checks headers_sent()Excel::loadImageFile() rejects dangerous stream wrappers (php://, phar://, glob://, zip://, data://, expect://, …)_xlfn/_xlws passes when the formula contains no (sharedStrings.xml is streamed to disk instead of built entirely in memory (much lower peak memory when shared_string is enabled)Sheet::writeRow() hot pathremoveSheet() + makeSheet(), new worksheet files use a monotonic index and never reuse a previous sheetN.xmlStyle object can be created directly from an options array – new Style($options)Excel::getSharedStringsRefCount()DataValidation/Conditional objects – applying one object to several ranges kept only the last range, see https://github.com/aVadim483/fast-excel-writer/issues/137Sheet::setStateVeryHidden() – it made the sheet visible instead of very hiddenSheet::writeCell() – the last valid row (1048576) and column (XFD) were rejectedExcel::rangeDimensionRelative() – a range given as two associative points collapsed to a single cellWriter::xmlSpecialChars() now uses ENT_SUBSTITUTE)LC_NUMERIC locale (e.g. de_DE) on PHP 7.4 – no more invalid <v>3,14</v>StyleManager read default-font state from the wrong instance)sheetN.xml after removeSheet() + makeSheet()Sheet::writeCells() dropping positional (integer-keyed) cell styles"" and national function names containing regex metacharactersxml:space="preserve")Area::getOffsetAddress() ignoring its offset argumentSheet::skipRow(null) skipping no rowsstrtolower()/htmlspecialchars() on non-string argumentsZipArchive handle not being closed if saving throws an exceptionExcel::download() strips CR/LF and quotes from the file name (header injection), sends the correct xlsx MIME type, adds an RFC 5987 filename* and checks headers_sent()Excel::loadImageFile() rejects dangerous stream wrappers (php://, phar://, glob://, zip://, data://, expect://, …)_xlfn/_xlws passes are skipped when the formula contains no (sharedStrings.xml writing – streamed to disk instead of built entirely in memory (much lower peak memory when shared_string is enabled)Sheet::writeRow() hot pathremoveSheet() + makeSheet(), new worksheet files use a monotonic index and never reuse a previous sheetN.xmlNew demos: rich text (demo-14), images & notes (demo-15); errors fixed in other demos, deprecated chart methods replaced
Writer::_writeCell()Charts\Layout::getXMode() and Charts\Layout::getYMode() - fatal TypeError when adding pie/donut chartsRichTextFragment::outXml() - font size set via setSize() was not writtenNothing published for this version
Nothing published for this version
The behavior of the Sheet::setColFormats(), Sheet::setColStyleArray() and Sheet::setColDataStyleArray() methods has been changed when column numbers w
The behavior of the Sheet::setColFormats(), Sheet::setColStyleArray() and Sheet::setColDataStyleArray() methods has been changed when column numbers were used as keys (it was incorrect)
ImageStyle, can be used as an argument in Sheet::addImage()Sheet::setColFormats(), Sheet::setColStyleArray(), Sheet::setColDataStyleArray()Style::setVerticalAlign()New class Options for workbook settings
Options for workbook settingsExcel::getStyleCellStyles() and Excel::getStyleCellStyleXfs()upd: numFmts index calculation; upd: styles.xml for extra features; upd: set style to cells without value;
upd: numFmts index calculation; upd: styles.xml for extra features; upd: set style to cells without value;
rename Excel::$style to Excel::$styleManager and other updates for extra features
rename Excel::$style to Excel::$styleManager and other updates for extra features
Deprecated methods removed: Sheet::setColStyles(), Sheet::setColOptions(), Sheet::getExternalLinks(), Sheet::setPageOptions(), Sheet::setRowOptions(),…
Sheet::setAutoFilter() – Supports specifying range
Nothing published for this version
add Sheet:setShowGridLines() and methods for headers/footers of pages several minor updates and fixes
add Sheet:setShowGridLines() and methods for headers/footers of pages several minor updates and fixes
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
add: new class Style; add: method setR1C1(); upd: refactor hyperlinks; upd: the cell value can be an instance of DateTimeInterface; upd: the cell valu
add: new class Style; add: method setR1C1(); upd: refactor hyperlinks; upd: the cell value can be an instance of DateTimeInterface; upd: the cell value can be boolean; upd: auto width for datetime; fix: skipRow() that skips two lines instead of one; fix: Column formatting; fix: sharedString;
Nothing published for this version
Conditional Formatting (see Conditional Formatting)
New methods Sheet::getCurrentRow(), Sheet::getCurrentCol(), Sheet::getCurrentCell()
New methods Sheet::getCurrentRow(), Sheet::getCurrentCol(), Sheet::getCurrentCell()
float values for font size; upd docs; refactoring;
float values for font size; upd docs; refactoring;
`Sheet::setRowOptions(), Sheet::setColOptions(), Sheet::setRowStyles() and Sheet::setColStyles() are deprecated, instead of them you should use other…
Sheet::setRowOptions(), Sheet::setColOptions(), Sheet::setRowStyles() and Sheet::setColStyles()
are deprecated, instead of them you should use other functions: setRowStyle(), setRowStyleArray(),
setRowDataStyle(), setRowDataStyleArray(), setColStyle(), setColStyleArray(), setColDataStyle(), setColDataStyleArray()Sheet::setRowStyle() and Sheet::setColStyle() has changed, they now set styles for the entire row or column (even if they are empty)setRowStyleArray(), setRowDataStyle(), setRowDataStyleArray(), setColStyleArray(), setColDataStyle(), setColDataStyleArray()PHP extension 'intl' is desirable but not required
Nothing published for this version
Nothing published for this version
new method $sheet->setTabColor($color);
$sheet->addImage($cell, $path, \['hyperlink' => $url\]);
fix: https://github.com/aVadim483/fast-excel-writer/issues/69
fix: https://github.com/aVadim483/fast-excel-writer/issues/69
Excel::setActiveSheet($name): Excel Sheet::isName($name): bool Sheet::setPrintArea($range): Sheet Sheet::setPrintTopRows($rows): Sheet Sheet::setPrint
Excel::setActiveSheet($name): Excel Sheet::isName($name): bool Sheet::setPrintArea($range): Sheet Sheet::setPrintTopRows($rows): Sheet Sheet::setPrintLeftColumns($cols): Sheet Sheet::setPrintGridlines($bool): Sheet
Nothing published for this version
Nothing published for this version
upd: rich text upd: group/outline rows and columns
upd: rich text upd: group/outline rows and columns
Nothing published for this version
Nothing published for this version
New option 'temp_prefix' - custom prefix for temporary files
Nothing published for this version
Nothing published for this version
Nothing published for this version
setDataSeriesTickLabels() => setCategoryAxisLabels()
Chart support!
Chart support!
Nothing published for this version
change default font to Calibri 11; fix workbook default font; fix Sheet::setValue();
change default font to Calibri 11; fix workbook default font; fix Sheet::setValue();
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix formulas with national function names; refactoring
Fix formulas with national function names; refactoring
Nothing published for this version
Nothing published for this version
One column per quarter.