For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cell format Registry

Spreadsheet lets you store and compress duplicate format data using cellxfs registries

Cell format registry lets you store formats in a central place and reference each format on the cell via a short ID (sid) instead of inlining the full format object. This typically gives ~70% compression on cell data.

// Before cellXfs registry
// Cell data A1:

{
  uf: {
    backgroundColor: "green",
    horizontalAlignment: "left"
  },
  ue: {
    sv: "Cell with styleId",
  },
  fv: "Cell with styleId",
  note: "Hello world, this is notes.",
},

// After cellXfs registry — `uf` becomes a StyleReference
{
  uf: {
    sid: "123",
  },
  ue: {
    sv: "Cell with styleId",
  },
  fv: "Cell with styleId",
  note: "Hello world, this is notes.",
},

Only uf is written. The effective format is no longer persisted on CellData — the renderer derives it on the fly from uf (via the registry lookup), the cell value, and (for formula cells) precedent formats.

Usage

Last updated