XLSX

Cells & Data

Cell data types, row structure, and basic data entry

Cells are the building blocks of worksheets. Each cell holds a value and optional style.

Cell Values

{
  "worksheets": [
    {
      "name": "Sheet1",
      "rows": [{ "cells": [{ "value": "Hello" }, { "value": 42 }, { "value": true }] }]
    }
  ]
}

Supported value types:

TypeExampleDescription
string{ value: "Hello" }Shared string reference
number{ value: 42 }Inline numeric value
boolean{ value: true }Boolean value (0/1)
Date{ value: new Date("2024-01-01") }Serial number
null{ value: null }Empty cell (skipped)

Styled Cells

Apply styles directly to cells:

{
  "worksheets": [
    {
      "name": "Sheet1",
      "rows": [
        {
          "cells": [
            {
              "value": "Header",
              "style": { "font": { "bold": true }, "fill": { "color": "4472C4" } }
            },
            { "value": 100, "style": { "numFmt": "#,##0" } }
          ]
        }
      ]
    }
  ]
}

See Styles for the full list of style options.

Row Heights

Set custom row heights:

{
  "worksheets": [
    {
      "name": "Sheet1",
      "rows": [{ "cells": [{ "value": "Tall row" }], "height": 30 }]
    }
  ]
}

Hidden Rows

{
  "worksheets": [
    {
      "name": "Sheet1",
      "rows": [
        { "cells": [{ "value": "Visible" }] },
        { "cells": [{ "value": "Hidden" }], "hidden": true }
      ]
    }
  ]
}

Number Formats

Common number format patterns:

PatternInputDisplay
#,##012341,234
#,##0.001234.51,234.50
0%0.8585%
yyyy-mm-ddDate2024-01-01

Cell Options Reference

OptionTypeDescription
valuestring | number | boolean | Date | nullCell value (auto-reference when omitted)
referencestringExplicit cell reference, e.g. "A1"
styleStyleOptionsCell style (see Styles)
styleIndexnumberDirect style index (overrides style)
formulaFormulaOptionsCell formula; value is the cached result

Row Options Reference

| Option | Type | Description | | -------- | --------------- | ----------------- | ---------------------------------------- | | cells | CellOptions[] | Array of cells | | height | number | UniversalMeasure | Row height in points or UniversalMeasure | | hidden | boolean | Hide the row |

Copyright © 2026