Commit Graph
2 Commits
Author SHA1 Message Date
Dylan M. Taylor eb640fd992 Add craft-sheet: the cell positions, values and tables the spreadsheet formats share (#956)
craft-xls carried its own CellRef, Range, Value, CellError, Visibility, sheet-name
quoting, built-in number format table and indexed palette. craft-xlsx and craft-ods
need the same ones, so they move to a crate with no dependencies and craft-xls
re-exports them: an application gets one Value and one CellRef whichever file it read.

Added on the way: A1 parsing (CellRef::parse, Range::parse), Range::count and a1,
CellError::parse and the newer error values SpreadsheetML stores as text,
builtin_format_id for writers.
2026-11-11 19:24:39 -05:00
Dylan M. TaylorandDaniele Mori 97bb39ca15 Add craft-xls: Excel 97-2003 (.xls, BIFF8) workbook reader, from GridCraft (#878)
* Add craft-xls: Excel 97-2003 (.xls, BIFF8) workbook reader

Moved from GridCraft's gridcraft-xlsx crate (crates/xlsx/src/xls.rs and
xls/ at 5cf52c5f), where it read into GridCraft's own workbook model.
Here it reads into a model of the file's own terms: cells, formulas as
A1 text, one CellFormat per XF, ColInfo and Row records in file units,
defined names, print areas as formula text.

The container is read with craft-cfb. RString cells and the fixture
writer in craft_xls::testing come from WordCraft's mail-merge reader
(crates/formats/src/sheet/xls.rs).

* craft-xls: report the sheet the workbook was saved on

Window1's itabCur, counted over every BoundSheet8 record, as
Workbook::active_sheet (an index into the worksheets that were read).
Whether to open on a hidden sheet is the caller's choice.

Ported from storytold/gridcraft#3551.

---------

Co-authored-by: Daniele Mori <3956663+Morzilla@users.noreply.github.com>
2026-11-11 18:07:19 -05:00