Repository navigation
v2.0.0
Breaking
-
Typed exception hierarchy. Failures now throw a sealed
ExcelException
instead of the generic error types used before:ExcelArchiveException: the bytes are not a readable.xlsxcontainer.
Replaces the oldUnsupportedErrorandArgumentErrorfor unreadable
files.ExcelFormatException: a valid archive with malformed or inconsistent
XML. Replaces the oldArgumentError.ExcelEncodeException: the workbook could not be encoded on save.FormulaParseException: raised inside the formula parser; it implements
FormatException, so existing handlers keep working. Through the public
API a bad formula still surfaces as an#ERROR!cell value.
Each carries a
message, an optionalpart, and an optionalcause.
Corrupt input was previously signalled withErrorsubtypes, which Dart
reserves for programming bugs; bad input is an expected runtime condition,
so it now throws anExceptionyou are meant to catch. Genuine argument
validation still throwsArgumentError. To migrate, replace
on ArgumentError,on UnsupportedError, oron Erroraround decode
calls withon ExcelExceptionor a specific subtype.
Fixed
- Pivot
<pivotCaches>workbook ordering. It was written in an invalid
position that made Excel offer to repair files containing certain optional
elements; it is now ordered correctly. - Formula serialization round-trip. Re-serialized shared formulas now
re-double embedded quotes and single-quote non-identifier sheet names, so
they parse back correctly. - Criteria wildcards.
COUNTIF,SUMIF, and their multi-criteria
variants honor*and?wildcards, with~as the literal escape. WEEKDAYsupports return types 11 to 17 and returns#NUM!for an
unsupported type.INDEXwith a zero row or column returns the whole column or row as an
array instead of#REF!.- Approximate
VLOOKUP,HLOOKUP,MATCH, andLOOKUPcompare within a
value type, so a number is never matched against a text key. - Unary operators broadcast over arrays, matching the binary operators.
TEXTscaling commas. A comma after the last digit placeholder scales
the value by 1000 per comma, distinct from a grouping comma.- Input validation and cleanup.
addPivotTablerejects field indices
outside the source range instead of crashing on save,addChartrejects a
chart with no series, andremoveTabledeletes the orphaned table part and
its content-type entry.
Internal
- Replaced literal NUL bytes used as map-key delimiters with Unicode escapes
so the affected source files are plain text again; added*.xlsxto
.pubignore.