Added
- Reading of legacy XLS workbooks (Excel 97-2003, BIFF8).
Excel::open()now chooses the reader
from the file signature, so XLSX and XLS are opened the same way; the file extension is never
consulted.Excel::openXls()opens a workbook explicitly andExcel::isXls()exposes the test.
Seedocs/21-xls.md.- Values and types, with dates detected through number formats
- Cell styles: fonts, fills, borders, alignment, number formats and palette colours
- Formula text, including shared formulas
- Embedded images
- Multiple worksheets, hidden and very hidden sheets, merged cells, sheet dimensions
- Encrypted workbooks and BIFF5/BIFF7 files are rejected with a message saying which
AbstractBookandAbstractSheet, holding the format-independent half of the readers: read areas,
key modes, result-mode flags, the row generator and everyread*helper. XLSX and XLS share one
implementation of the whole public reading API.withHeader()now accepts an optional list of column names:withHeader(['name', 'birthday']). The
header row is still skipped, but the names come from the list instead of from its values. Names are
positional - the first name goes to the first column of the read area - so no column letters are
involved and the same call works on a sheet whose data does not start atA1. A shorter list renames
only the columns it covers. Supported for XLSX, XLS and CSV. Calling it with no argument is
unchanged. This mirrors the naming ofwriteHeader()in the sibling fast-excel-writer.
Fixed
Sheet::readCellsWithStylesFrom()returned bare cell values instead of values with styles: it called
readCells()rather thanreadCellsWithStyles(), and passed the style key into a bool parameter.Sheet::readCellsWithStyles($styleKey)never narrowed the result to the requested property. The key
was looked up on the nested style, where properties sit inside their group, so'fill-color'- the
example in the method's own docblock - always returned the complete style instead.- Complete cell styles -
getCompleteStyleByIdx(),readCellsWithStyles()and everything built on
them - died withCall to undefined method DOMText::getAttribute()on workbooks whosestyles.xml
is written with indentation, which several writers do.
Changed
- Reading XLSX is about 1.5 times faster. Values, types and peak memory are unchanged.
- The accessors that returned a concrete
Sheetnow returnAbstractSheet, and the fluent setters on
the workbook returnAbstractBook. The objects handed back are unchanged, and a subclass may still
narrow the return type back, so this only affects explicit type declarations in calling code.
Full changelog: CHANGELOG.md · по-русски