FastExcelWriter – Upgrade Guide

Source: 6.19.2 · 0608684

On this page

This page describes important changes between major versions that may require updating your code.

Upgrade to version 6

The general news of v.6.0 is Data Validation support.

Rich text changes in version 6.18

RichText::addText() and RichTextFragment now escape literal input on serialization. Remove manual htmlspecialchars() calls before passing text or font names to these APIs. For example, pass A & B, not A & B; the latter now displays literally as A & B. The constructor and addTaggedText() still accept XML entities (&, <, numeric references), which are decoded once before serialization. Unknown tags now remain text.

setBold(), setItalic() and setStrike() accept an optional boolean argument; setSize() takes float instead of int (integer calls still work). Update overridden signatures if you subclass RichText or RichTextFragment. setUnderline(false) continues to mean single underline; use removeUnderline() to disable it.

Important changes in version 6.9

  • The namespace of the RichText class has been changed to avadim\FastExcelWriter\RichText
  • The namespace of the Style, StyleManager, and Font classes has been changed to avadim\FastExcelWriter\Style
  • Deprecated methods removed: Sheet::setColStyles(), Sheet::setColOptions(), Sheet::getExternalLinks(), Sheet::setPageOptions(), Sheet::setRowOptions(), Sheet::setRowStyles()

Important changes in version 6.1

  • 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()
  • The behavior of the Sheet::setRowStyle() and Sheet::setColStyle() has changed, they now set styles for the entire row or column (even if they are empty)

Upgrade to version 5

The general news of v.5.0 is Chart support.

Important changes in version 5.8

Before v.5.8

php
$sheet->writeCell(12345); // The number 12345 will be written into the cell
$sheet->writeCell('12345'); // The number 12345 will also be written here

In version 5.8 and later

php
$sheet->writeCell(12345); // The number 12345 will be written into the cell
$sheet->writeCell('12345'); // Here the string '12345' will be written into the cell

If you want to keep the previous behavior for backward compatibility, you should use option 'auto_convert_number' when creating a workbook.

php
$excel = Excel::create(['Sheet1'], ['auto_convert_number' => true]);
$sheet = $excel->sheet();
$sheet->writeCell('12345'); // String '12345' will be automatically converted to a number

Renamed methods in version 5.1

Some chart methods have been renamed

  • setDataSeriesTickLabels() => setCategoryAxisLabels()
  • setXAxisLabel() => setCategoryAxisTitle()
  • getXAxisLabel() => getCategoryAxisTitle()
  • setYAxisLabel() => setValueAxisTitle()
  • getYAxisLabel() => getValueAxisTitle()

Upgrade to version 4

  • Now the library works even faster
  • Added a fluent interface for applying styles
  • New methods and code refactoring

See the full list of changes in the CHANGELOG.

FastExcelWriter 6.19.2 · Search this library and version.

Loading search…

Could not load search. Please try again.

No results. Try another word or method name.