The structure of reogrid-json. It is shared with the web edition (reogrid-web), and unknown keys are ignored silently.
The document
{
"format": "reogrid-json",
"version": 1,
"styles": [ ... ],
"numberFormats": [ "#,##0", "yyyy/mm/dd" ],
"definedNames": [ ... ],
"workbook": { "activeSheet": 0, "sheets": [ ... ] }
}
| Key | What it is |
|---|---|
format | Always "reogrid-json" |
version | Currently 1 |
styles | The style table; cells reference it by index |
numberFormats | The format-code table; likewise |
definedNames | Defined names |
workbook | The workbook itself |
Styles and number formats are collected into tables, so tens of thousands of cells sharing a format add nothing to the file size.
definedNames
{ "name": "SalesData", "scope": null, "address": "Sheet1!A2:C100" }
A null scope means workbook scope; a sheet name means that sheet’s scope.
A worksheet
{
"name": "Sheet1",
"rowCount": 1048576,
"columnCount": 16384,
"defaultRowHeight": 20,
"defaultColumnWidth": 80,
"rows": { ... },
"cols": { ... },
"cells": [ ... ],
"merges": [ ... ],
"borders": [ ... ],
"outlines": { ... },
"cellTypes": [ ... ],
"conditionalFormats": [ ... ],
"filter": { ... }
}
Optional keys are omitted when their content is empty.
cells
Only cells that exist appear.
{ "r": 0, "c": 0, "v": 1200, "f": "SUM(A1:A2)", "s": 3, "nf": 1, "rt": [ ... ] }
| Key | What it is |
|---|---|
r / c | Row and column (zero-based) |
v | The value |
f | The formula (without the leading =) |
s | An index into the styles table |
nf | An index into the numberFormats table |
rt | Rich-text runs |
rt (rich text)
[ { "text": "Total " },
{ "text": "12,800", "bold": true, "color": "#cc0000" } ]
The keys are text, bold, italic, underline, fontFamily, fontSize and color.
cellTypes
Saved scoped to a range.
{ "r": 0, "c": 0, "rs": 1048576, "cs": 1, "config": { "type": "checkbox" } }
rs / cs are the row and column counts. What is inside config is whatever the cell type
wrote in WriteConfig (Custom Cell Types).
outlines
{
"rows": [ [ { ... } ], [ { ... } ] ],
"columns": [ ... ],
"rowsSummaryBelow": true,
"columnsSummaryRight": true
}
rows / columns are an array per nesting level (index 0 is the outermost).
filter
{
"headerRow": 0,
"startColumn": 0,
"endColumn": 3,
"columns": [
{ "column": 1, "selectedValues": ["Tokyo", "Osaka"],
"condition": { "op": "greaterThan", "value": "1000" } }
]
}
The setup and the per-column selected values round-trip. Row visibility is recomputed on load.
condition is a V5 extension (the web edition ignores it).
Colors
Written as "#rrggbb". Alpha is omitted and treated as opaque.
What is not saved
Scroll position, selection, freeze panes, zoom and the undo history — all run-time state.