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",
      "children": [{ "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",
      "children": [
        {
          "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",
      "children": [{ "cells": [{ "value": "Tall row" }], "height": 30 }]
    }
  ]
}

Hidden Rows

{
  "worksheets": [
    {
      "name": "Sheet1",
      "children": [
        { "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
styleStyleOptionsCell style (see Styles)

Row Options Reference

OptionTypeDescription
cellsCellOptions[]Array of cells
heightnumberRow height in points
hiddenbooleanHide the row
Copyright © 2026