Skip to content

v1.1.0

Choose a tag to compare

@almasumdev almasumdev released this 29 Aug 20:14
· 175 commits to main since this release

Added

  • Images (read and write). Embed pictures with
    sheet.insertImage(bytes, anchor:, width:, height:) and read them back via
    sheet.images. PNG, JPEG, and GIF are supported; format and intrinsic size
    are detected from the bytes. Existing images are preserved and new ones are
    appended alongside them.
  • Page and print setup (read and write). sheet.pageSetup = PageSetup(...)
    controls orientation, paper size, scaling, fit-to-page, centering, printed
    gridlines and headings, and margins with normal, wide, and narrow presets.
  • Print area, print titles, and manual page breaks.
    setPrintArea, setPrintTitleRows and setPrintTitleColumns for repeated
    headers, and insertRowPageBreak and insertColumnPageBreak, each with
    matching getters and removers. All page-setup features are change-gated: an
    opened file keeps its existing setup byte-for-byte unless changed through
    the API.
  • Row and column grouping (read and write). groupRows, groupColumns,
    and their ungroup counterparts nest outline levels; read levels and control
    visibility with setRowHidden, setColumnHidden, and their getters.
    Outline state round-trips.
  • Cell comments (read and write). sheet.setComment(index, Comment(...))
    or cell.comment attach classic notes; authoring writes the comments part
    and its legacy plumbing, and existing comments are read and preserved.
  • Workbook protection (read and write). excel.protectWorkbook(...) locks
    the workbook structure and windows, with matching getters and
    unprotectWorkbook(). The optional password uses Excel's legacy hash.
  • Pattern fills (read and write). CellStyle.fillPattern draws a hatch or
    shade using the background color as the pattern color over an optional fill
    background. Non-solid patterns now survive a read round-trip.
  • Formula evaluation engine (opt-in). sheet.evaluate(cell) computes a
    formula's value, and excel.recalculate() recomputes every formula cell
    and stores the results so a saved file shows them. Around 130 built-in
    functions across math, statistics, criteria, logic, text, lookup,
    financial, and date and time, plus dynamic arrays (FILTER, SORT,
    UNIQUE, SEQUENCE). References resolve lazily with memoization and cycle
    detection; shared formulas are expanded on read; array results spill into
    their range on recalculate. Register custom functions with
    excel.formula.registerFunction. Nothing runs during normal read or write.
  • Excel tables (read and write). sheet.addTable(ExcelTable(...)) turns a
    range into a named table with a styled header and autofilter; read via
    sheet.tables and remove with removeTable. Column names come from the
    header row or an explicit list, de-duplicated as Excel requires. Existing
    tables round-trip untouched.
  • Charts (authoring). sheet.addChart(Chart.column(...)) plus bar, line,
    area, pie, doughnut, and scatter constructors, each supporting multiple
    series, category labels, titles, legend position, grouping, and a pixel
    size anchored to a cell. Charts already in a file round-trip untouched.
  • Pivot tables (authoring). sheet.addPivotTable(PivotTable(...))
    summarises a range with a row field and one or more measures; column
    fields, page fields, and nested row fields are supported. The cache is
    marked refresh-on-load so Excel rebuilds it on open. Existing pivots
    round-trip untouched.

Fixed

  • Unmodeled parts survive a save. The archive cloner reused decoded zip
    entries directly, which the encoder re-wrote with a mismatched compression
    flag, corrupting untouched parts such as embedded media and printer
    settings. Parts are now carried across by value and re-compressed cleanly.