Stable public facade and the sole transaction, epoch, policy, and event barrier.
Package
@sheetwrite/core
Source
packages/core/src/store.ts#L79
Members 51
constructor
constructor(workbook: Workbookinterface Workbook {
sheets: Sheet[];
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}Live workbook schema containing ordered sheets and the active sheet ID.API reference →, data?:ColumnarDatainterface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interfaceColumnarData {rowCount:number;columns:Record<string, ArrayLike<CellScalar|CellValue>>;}interfaceColumnarData {rowCount:number;columns:Record<string,ArrayLike<CellScalar|CellValue>>;}Eager column-oriented values used to initialize a sheet.API reference →, options?:SheetwriteStoreOptionsinterface SheetwriteStoreOptions {
snapshotResourceLimits?: Partial<SnapshotResourceLimits>;
transactionResourceLimits?: Partial<TransactionResourceLimits>;
storage?: "dense" | "paged";
chunkRows?: number;
cacheBytes?: number;
protectionResolver?: ProtectionResolver;
mutationPolicy?: MutationPolicyMode;
}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}Storage layout plus snapshot and transaction resource ceilings for one store.API reference →);
acknowledgeOperationsRelease paged dirty pins after server acknowledgement.
acknowledgeOperations: (operations:readonlyDocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 78 more lines — see the API reference
}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| { op:"setRange"; range:Range; cells:SnapshotCell[] }| { op:"setBlock"; range:Range; block:PackedCellBlock }| {op:"setRangeStyle";range:Range;style:Partial<CellStyle> |null;}| {// … 78 more lines — see the API reference}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| {op:"setRange";range:Range;cells:SnapshotCell[];}| {op:"setBlock";range:Range;block:PackedCellBlock;}| {op:"setRangeStyle";// … 138 more lines — see the API reference}Exhaustive serializable operation union for workbook mutations.API reference →[]) =>void;
aggregate
aggregate: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, op:AggregateOptype AggregateOp = "sum" | "avg" | "min" | "max" | "count";typeAggregateOp="sum"|"avg"|"min"|"max"|"count";typeAggregateOp=|"sum"|"avg"|"min"|"max"|"count";Column aggregate operation for Grid.aggregate / Store data ops.API reference →) => number;
applyTransactionApply a low-level storage transaction.
applyTransaction: (tx:Transactioninterface Transaction {
patches: DocumentOp[];
epoch?: number;
}interfaceTransaction {patches:DocumentOp[];epoch?:number;}interfaceTransaction {patches:DocumentOp[];epoch?:number;}Low-level Store transaction. epoch provides optional optimistic concurrency at the storage boundary. Calling Store.applyTransaction bypasses Grid read-only checks and Grid undo/redo history. Host-driven edits should use Grid.applyTransaction.API reference →, reasonOrOptions?:CommitReason|TransactionApplicationOptionsinterface TransactionApplicationOptions {
source?: OperationSource;
commitReason?: CommitReason;
}interfaceTransactionApplicationOptions {source?:OperationSource;commitReason?:CommitReason;}interfaceTransactionApplicationOptions {source?:OperationSource;commitReason?:CommitReason;}Source and commit classification used when applying a transaction.API reference →) =>ApplyTransactionResulttype ApplyTransactionResult =
| {
status: "applied";
epoch: number;
transaction: Transaction;
warnings?: MutationIssue[];
rejections?: MutationIssue[];
}
| {
status: "conflict";
expectedEpoch: number;
actualEpoch: number;
}
| { status: "rejected"; epoch: number; issues: MutationIssue[] }
| {
// … 5 more lines — see the API reference
}typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| { status:"rejected"; epoch:number; issues:MutationIssue[] }| {// … 5 more lines — see the API reference}typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| {status:"rejected";epoch:number;issues:MutationIssue[];}| {// … 8 more lines — see the API reference}Outcome of applying a document transaction, including conflict, rejection, and no-op states.API reference →;
Apply a low-level storage transaction.
This bypasses Grid read-only checks and Grid undo/redo history. Use
Grid.applyTransaction for normal host-driven edits.
Queued and flushed at a barrier — never reentrant.
canApplyLocally
canApplyLocally: (patch:DocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 78 more lines — see the API reference
}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| { op:"setRange"; range:Range; cells:SnapshotCell[] }| { op:"setBlock"; range:Range; block:PackedCellBlock }| {op:"setRangeStyle";range:Range;style:Partial<CellStyle> |null;}| {// … 78 more lines — see the API reference}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| {op:"setRange";range:Range;cells:SnapshotCell[];}| {op:"setBlock";range:Range;block:PackedCellBlock;}| {op:"setRangeStyle";// … 138 more lines — see the API reference}Exhaustive serializable operation union for workbook mutations.API reference →) => boolean;
captureRangeHistory
captureRangeHistory: (input:Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interfaceRange {sheet:SheetId;start: { row:number; col:number };end: { row:number; col:number };}interfaceRange {sheet:SheetId;start: {row:number;col:number;};end: {row:number;col:number;};}Inclusive rectangular cell range on a stable sheet ID.API reference →) => CompactRangeHistory |null;
clearView
clearView: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>void;
columnFilters
columnFilters: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => ReadonlyMap<number, ColumnFiltertype ColumnFilter =
| { kind: "values"; values: readonly CellScalar[] }
| { kind: "contains"; text: string; matchCase?: boolean }
| {
kind: "compare";
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
value: number;
}
| { kind: "empty" }
| { kind: "nonEmpty" };typeColumnFilter=| { kind:"values"; values:readonlyCellScalar[] }| { kind:"contains"; text:string; matchCase?:boolean }| {kind:"compare";op:"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| { kind:"empty" }| { kind:"nonEmpty" };typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:|"gt"|"gte"|"lt"|"lte"|"eq"|"neq";// … 4 more lines — see the API reference}One column's filter predicate. All active column filters AND together; matching is against the cell's resolved value (text or number).API reference →>;
dataEdge
dataEdge: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, row:number, col:number, dRow:number, dCol:number) => number;
dataRowAt
dataRowAt: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, viewRow:number) => number;
dispose
dispose: () =>void;
distinctValues
distinctValues: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, limit?:number) =>CellScalartype CellScalar = string | number | boolean | null;typeCellScalar=string|number|boolean|null;typeCellScalar=|string|number|boolean|null;A scalar that can be displayed directly.API reference →[];
ensureColumnsEnsure a sheet can address at least columns.length columns without producing user changes or dirty patches.
ensureColumns: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, columns:readonlyColumninterface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
}interfaceColumn {key:string;header:string;width:number;type:CellFormat;numberFormat?:string;numberLocale?:string;headerStyle?:CellStyle;cellStyle?:CellStyle;visible?:boolean;renderer?:string;}interfaceColumn {key:string;header:string;width:number;type:CellFormat;numberFormat?:string;numberLocale?:string;headerStyle?:CellStyle;cellStyle?:CellStyle;visible?:boolean;renderer?:string;}Schema and default presentation for one workbook column.API reference →[]) =>void;
Ensure a sheet can address at least `columns.length` columns without
producing user changes or dirty patches. Used for presentation padding.
filterBy: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, needle:string) =>void;
getCellSingle-cell read for interactions, API reads, and tests.
getCell: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>ResolvedCellinterface ResolvedCell {
resolved: CellScalar;
style: CellStyle;
}interfaceResolvedCell {resolved:CellScalar;style:CellStyle;}interfaceResolvedCell {resolved:CellScalar;style:CellStyle;}Authoritative source value, evaluated value, style, and load state for a cell.API reference →;
Single-cell read for interactions, API reads, and tests.
NOT for the render hot path — renderers use `getVisibleWindow`.
getCellLoadStateLoaded/empty/local state; dense stores always return a loaded state.
getCellLoadState: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>CellLoadStatetype CellLoadState =
"unloaded" | "loaded-empty" | "loaded-value" | "local-edit";typeCellLoadState="unloaded"|"loaded-empty"|"loaded-value"|"local-edit";typeCellLoadState=|"unloaded"|"loaded-empty"|"loaded-value"|"local-edit";Datasource loading state for a resolved cell.API reference →;
getClipboardWindowOptional packed clipboard read.
getClipboardWindow: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, viewRows: { start:number; end:number; }, cols:readonlynumber[]) => ClipboardWindowView;
Optional packed clipboard read. Custom stores may omit it; the controller
preserves the per-cell Store fallback contract.
getDataWindowOptional packed canonical data-row window used by file export.
getDataWindow: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows: { start:number; end:number; }, cols:readonlynumber[]) =>VisibleWindowViewinterface VisibleWindowView {
sheet: SheetId;
rows: { start: number; end: number };
cols: readonly number[];
values: ArrayLike<CellScalar>;
styleIds: Uint32Array;
styles: readonly CellStyle[];
valueKinds?: Uint8Array;
numberValues?: Float64Array;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
}interfaceVisibleWindowView {sheet:SheetId;rows: { start:number; end:number };cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}interfaceVisibleWindowView {sheet:SheetId;rows: {start:number;end:number;};cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call. The renderer paints from this view and MUST NOT call Store.getCell per cell. styleIds are view-local indices into this view's compact styles dictionary; on the worker renderer path, styleIds.buffer is transferred during paint, so main-thread code must not read it after paint. Lifetime: valid until the next store mutation or window refresh.API reference →;
Optional packed canonical data-row window used by file export. Unlike
`getVisibleWindow`, sort/filter state never remaps `rows`.
getFormulaFormula source at addr, or null when the cell is not a formula.
getFormula: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) => string |null;
getPagedStats
getPagedStats: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>PagedStoreStatsinterface PagedStoreStats {
chunks: number;
loadedCells: number;
dirtyCells: number;
allocatedBytes: number;
fullyLoaded: boolean;
}interfacePagedStoreStats {chunks:number;loadedCells:number;dirtyCells:number;allocatedBytes:number;fullyLoaded:boolean;}interfacePagedStoreStats {chunks:number;loadedCells:number;dirtyCells:number;allocatedBytes:number;fullyLoaded:boolean;}Allocation and load statistics for one paged datasource sheet.API reference →;
getRefTargetPlain-reference target at addr, or null when the cell is not a ref.
getRefTarget: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →|null;
getVisibleWindowBulk read of a visible window; the only read a renderer should use per frame.
getVisibleWindow: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows: { start:number; end:number; }, cols:readonlynumber[]) =>VisibleWindowViewinterface VisibleWindowView {
sheet: SheetId;
rows: { start: number; end: number };
cols: readonly number[];
values: ArrayLike<CellScalar>;
styleIds: Uint32Array;
styles: readonly CellStyle[];
valueKinds?: Uint8Array;
numberValues?: Float64Array;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
}interfaceVisibleWindowView {sheet:SheetId;rows: { start:number; end:number };cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}interfaceVisibleWindowView {sheet:SheetId;rows: {start:number;end:number;};cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call. The renderer paints from this view and MUST NOT call Store.getCell per cell. styleIds are view-local indices into this view's compact styles dictionary; on the worker renderer path, styleIds.buffer is transferred during paint, so main-thread code must not read it after paint. Lifetime: valid until the next store mutation or window refresh.API reference →;
getWorkbook
getWorkbook: () =>Workbookinterface Workbook {
sheets: Sheet[];
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}Live workbook schema containing ordered sheets and the active sheet ID.API reference →;
groupRows
groupRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, end:number) =>void;
hasView
hasView: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => boolean;
hiddenRows
hiddenRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => number[];
hideRows
hideRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows:readonlynumber[]) =>void;
isPaged
isPaged: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => boolean;
isRangeFullyLoaded
isRangeFullyLoaded: (input:Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interfaceRange {sheet:SheetId;start: { row:number; col:number };end: { row:number; col:number };}interfaceRange {sheet:SheetId;start: {row:number;col:number;};end: {row:number;col:number;};}Inclusive rectangular cell range on a stable sheet ID.API reference →) => boolean;
loadRows
loadRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, rows:readonlyRowDatatype RowData = Record<string, DataCell>;typeRowData=Record<string, DataCell>;typeRowData=Record<string,DataCell>;Object-shaped datasource row keyed by workbook column keys.API reference →[], protect?: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>boolean) =>void;
on
on: (_evt:"change", fn:ChangeListener) => () =>void;
queryCapabilityExplicit partial-data state for paged datasource stores.
queryCapability: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>QueryCapabilitytype QueryCapability =
| { status: "complete" }
| {
status: "incomplete";
loadedCells: number;
totalCells: number;
};typeQueryCapability=| { status:"complete" }| {status:"incomplete";loadedCells:number;totalCells:number;};typeQueryCapability=| { status:"complete" }| {status:"incomplete";loadedCells:number;totalCells:number;};Whether a query is complete for the currently loaded datasource pages.API reference →;
recalculateVolatileRecompute volatile formulas (TODAY/NOW) from one captured instant.
recalculateVolatile: (now?:Date) =>void;
Recompute volatile formulas (`TODAY`/`NOW`) from one captured instant.
The supplied Date is interpreted as an absolute UTC instant.
removeSheetFormulaIdentity
removeSheetFormulaIdentity: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => boolean;
renameSheetFormulaIdentity
renameSheetFormulaIdentity: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, name:string) => boolean;
resetRangeMutationAllocationStats
resetRangeMutationAllocationStats: () =>void;
rowGroups
rowGroups: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => readonly RowGroupinterface RowGroup {
start: number;
end: number;
collapsed: boolean;
}interfaceRowGroup {start:number;end:number;collapsed:boolean;}interfaceRowGroup {start:number;end:number;collapsed:boolean;}A collapsible row group (data-row range, end-inclusive), Sheets-style.API reference →[];
searchCells
searchCells: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, query:string, opts?: { matchCase?:boolean; wholeCell?:boolean; columns?:number[]; }) =>CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →[];
searchCellsFlat
searchCellsFlat: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, query:string, opts?: { matchCase?:boolean; wholeCell?:boolean; columns?:number[]; }) => Uint32Array;
setColumnFilter
setColumnFilter: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, filter:ColumnFiltertype ColumnFilter =
| { kind: "values"; values: readonly CellScalar[] }
| { kind: "contains"; text: string; matchCase?: boolean }
| {
kind: "compare";
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
value: number;
}
| { kind: "empty" }
| { kind: "nonEmpty" };typeColumnFilter=| { kind:"values"; values:readonlyCellScalar[] }| { kind:"contains"; text:string; matchCase?:boolean }| {kind:"compare";op:"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| { kind:"empty" }| { kind:"nonEmpty" };typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:|"gt"|"gte"|"lt"|"lte"|"eq"|"neq";// … 4 more lines — see the API reference}One column's filter predicate. All active column filters AND together; matching is against the cell's resolved value (text or number).API reference →|null) =>void;
setGroupCollapsed
setGroupCollapsed: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, collapsed:boolean) =>void;
Configure host-owned protected-range permissions. The resolver is synchronous
so every local mutation ingress shares one atomic commit barrier.
showRows
showRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows?:readonlynumber[]) =>void;
sortBy
sortBy: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, ascending:boolean) =>void;
sortByMulti
sortByMulti: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, keys:readonlySortKeyinterface SortKey {
col: number;
ascending: boolean;
}interfaceSortKey {col:number;ascending:boolean;}interfaceSortKey {col:number;ascending:boolean;}One key of a multi-column sort, applied in array order (first = primary).API reference →[]) =>void;
ungroupRows
ungroupRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, end:number) =>void;
viewRowCountDisplayed row count after any active sort/filter view.
viewRowCount: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) => number;
viewRowOf
viewRowOf: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, dataRow:number) => number |null;
fromSnapshot
static fromSnapshot: (input:unknown, options?:SheetwriteStoreOptionsinterface SheetwriteStoreOptions {
snapshotResourceLimits?: Partial<SnapshotResourceLimits>;
transactionResourceLimits?: Partial<TransactionResourceLimits>;
storage?: "dense" | "paged";
chunkRows?: number;
cacheBytes?: number;
protectionResolver?: ProtectionResolver;
mutationPolicy?: MutationPolicyMode;
}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}Storage layout plus snapshot and transaction resource ceilings for one store.API reference →) =>SheetwriteStoreclass SheetwriteStore implements Store {
constructor(
workbook: Workbook,
data?: ColumnarData,
options?: SheetwriteStoreOptions,
);
acknowledgeOperations: (
operations: readonly DocumentOp[],
) => void;
aggregate: (
sheet: SheetId,
col: number,
op: AggregateOp,
) => number;
applyTransaction: (
// … 116 more lines — see the API reference
}classSheetwriteStoreimplementsStore {constructor(workbook:Workbook,data?:ColumnarData,options?:SheetwriteStoreOptions,);acknowledgeOperations: (operations:readonlyDocumentOp[],) =>void;aggregate: (sheet:SheetId,col:number,op:AggregateOp,) =>number;applyTransaction: (// … 116 more lines — see the API reference}classSheetwriteStoreimplementsStore {constructor(workbook:Workbook,data?:ColumnarData,options?:SheetwriteStoreOptions,);acknowledgeOperations: (operations:readonlyDocumentOp[],) =>void;aggregate: (sheet:SheetId,col:number,op:AggregateOp,) =>number;applyTransaction: (tx:Transaction,reasonOrOptions?:|CommitReason|TransactionApplicationOptions,// … 198 more lines — see the API reference}Stable public facade and the sole transaction, epoch, policy, and event barrier.API reference →
Declaration
View full TypeScript declaration
classSheetwriteStoreimplementsStoreinterface Store {
getWorkbook(): Workbook;
getCell(addr: CellAddress): ResolvedCell;
getFormula(addr: CellAddress): string | null;
getRefTarget(addr: CellAddress): CellAddress | null;
recalculateVolatile(now?: Date): void;
getVisibleWindow(
sheet: SheetId,
rows: { start: number; end: number },
cols: readonly number[],
): VisibleWindowView;
getDataWindow?(
sheet: SheetId,
rows: { start: number; end: number },
cols: readonly number[],
// … 22 more lines — see the API reference
}interfaceStore {getWorkbook():Workbook;getCell(addr:CellAddress):ResolvedCell;getFormula(addr:CellAddress):string|null;getRefTarget(addr:CellAddress):CellAddress|null;recalculateVolatile(now?:Date):void;getVisibleWindow(sheet:SheetId,rows: { start:number; end:number },cols:readonlynumber[],):VisibleWindowView;getDataWindow?(sheet:SheetId,rows: { start:number; end:number },cols:readonlynumber[],// … 22 more lines — see the API reference}interfaceStore {getWorkbook():Workbook;getCell(addr:CellAddress,):ResolvedCell;getFormula(addr:CellAddress,):string|null;getRefTarget(addr:CellAddress,):CellAddress|null;recalculateVolatile(now?:Date,):void;getVisibleWindow(sheet:SheetId,rows: {start:number;end:number;// … 53 more lines — see the API reference}Columnar workbook storage, query, transaction, and subscription contract.API reference → {
constructor(
workbook:Workbookinterface Workbook {
sheets: Sheet[];
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}Live workbook schema containing ordered sheets and the active sheet ID.API reference →,
data?:ColumnarDatainterface ColumnarData {
rowCount: number;
columns: Record<string, ArrayLike<CellScalar | CellValue>>;
}interfaceColumnarData {rowCount:number;columns:Record<string, ArrayLike<CellScalar|CellValue>>;}interfaceColumnarData {rowCount:number;columns:Record<string,ArrayLike<CellScalar|CellValue>>;}Eager column-oriented values used to initialize a sheet.API reference →,
options?:SheetwriteStoreOptionsinterface SheetwriteStoreOptions {
snapshotResourceLimits?: Partial<SnapshotResourceLimits>;
transactionResourceLimits?: Partial<TransactionResourceLimits>;
storage?: "dense" | "paged";
chunkRows?: number;
cacheBytes?: number;
protectionResolver?: ProtectionResolver;
mutationPolicy?: MutationPolicyMode;
}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}Storage layout plus snapshot and transaction resource ceilings for one store.API reference →,
);
acknowledgeOperations: (operations:readonlyDocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 78 more lines — see the API reference
}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| { op:"setRange"; range:Range; cells:SnapshotCell[] }| { op:"setBlock"; range:Range; block:PackedCellBlock }| {op:"setRangeStyle";range:Range;style:Partial<CellStyle> |null;}| {// … 78 more lines — see the API reference}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| {op:"setRange";range:Range;cells:SnapshotCell[];}| {op:"setBlock";range:Range;block:PackedCellBlock;}| {op:"setRangeStyle";// … 138 more lines — see the API reference}Exhaustive serializable operation union for workbook mutations.API reference →[]) =>void;
aggregate: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, op:AggregateOptype AggregateOp = "sum" | "avg" | "min" | "max" | "count";typeAggregateOp="sum"|"avg"|"min"|"max"|"count";typeAggregateOp=|"sum"|"avg"|"min"|"max"|"count";Column aggregate operation for Grid.aggregate / Store data ops.API reference →) =>number;
applyTransaction: (
tx:Transactioninterface Transaction {
patches: DocumentOp[];
epoch?: number;
}interfaceTransaction {patches:DocumentOp[];epoch?:number;}interfaceTransaction {patches:DocumentOp[];epoch?:number;}Low-level Store transaction. epoch provides optional optimistic concurrency at the storage boundary. Calling Store.applyTransaction bypasses Grid read-only checks and Grid undo/redo history. Host-driven edits should use Grid.applyTransaction.API reference →,
reasonOrOptions?:CommitReason|TransactionApplicationOptionsinterface TransactionApplicationOptions {
source?: OperationSource;
commitReason?: CommitReason;
}interfaceTransactionApplicationOptions {source?:OperationSource;commitReason?:CommitReason;}interfaceTransactionApplicationOptions {source?:OperationSource;commitReason?:CommitReason;}Source and commit classification used when applying a transaction.API reference →,
) =>ApplyTransactionResulttype ApplyTransactionResult =
| {
status: "applied";
epoch: number;
transaction: Transaction;
warnings?: MutationIssue[];
rejections?: MutationIssue[];
}
| {
status: "conflict";
expectedEpoch: number;
actualEpoch: number;
}
| { status: "rejected"; epoch: number; issues: MutationIssue[] }
| {
// … 5 more lines — see the API reference
}typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| { status:"rejected"; epoch:number; issues:MutationIssue[] }| {// … 5 more lines — see the API reference}typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| {status:"rejected";epoch:number;issues:MutationIssue[];}| {// … 8 more lines — see the API reference}Outcome of applying a document transaction, including conflict, rejection, and no-op states.API reference →;
canApplyLocally: (patch:DocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 78 more lines — see the API reference
}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| { op:"setRange"; range:Range; cells:SnapshotCell[] }| { op:"setBlock"; range:Range; block:PackedCellBlock }| {op:"setRangeStyle";range:Range;style:Partial<CellStyle> |null;}| {// … 78 more lines — see the API reference}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| {op:"setRange";range:Range;cells:SnapshotCell[];}| {op:"setBlock";range:Range;block:PackedCellBlock;}| {op:"setRangeStyle";// … 138 more lines — see the API reference}Exhaustive serializable operation union for workbook mutations.API reference →) =>boolean;
captureRangeHistory: (input:Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interfaceRange {sheet:SheetId;start: { row:number; col:number };end: { row:number; col:number };}interfaceRange {sheet:SheetId;start: {row:number;col:number;};end: {row:number;col:number;};}Inclusive rectangular cell range on a stable sheet ID.API reference →) =>CompactRangeHistory|null;
clearView: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>void;
columnFilters: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>ReadonlyMap<number, ColumnFiltertype ColumnFilter =
| { kind: "values"; values: readonly CellScalar[] }
| { kind: "contains"; text: string; matchCase?: boolean }
| {
kind: "compare";
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
value: number;
}
| { kind: "empty" }
| { kind: "nonEmpty" };typeColumnFilter=| { kind:"values"; values:readonlyCellScalar[] }| { kind:"contains"; text:string; matchCase?:boolean }| {kind:"compare";op:"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| { kind:"empty" }| { kind:"nonEmpty" };typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:|"gt"|"gte"|"lt"|"lte"|"eq"|"neq";// … 4 more lines — see the API reference}One column's filter predicate. All active column filters AND together; matching is against the cell's resolved value (text or number).API reference →>;
dataEdge: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
row:number,
col:number,
dRow:number,
dCol:number,
) =>number;
dataRowAt: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, viewRow:number) =>number;
dispose: () =>void;
distinctValues: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
col:number,
limit?:number,
) =>CellScalartype CellScalar = string | number | boolean | null;typeCellScalar=string|number|boolean|null;typeCellScalar=|string|number|boolean|null;A scalar that can be displayed directly.API reference →[];
ensureColumns: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, columns:readonlyColumninterface Column {
key: string;
header: string;
width: number;
type: CellFormat;
numberFormat?: string;
numberLocale?: string;
headerStyle?: CellStyle;
cellStyle?: CellStyle;
visible?: boolean;
renderer?: string;
}interfaceColumn {key:string;header:string;width:number;type:CellFormat;numberFormat?:string;numberLocale?:string;headerStyle?:CellStyle;cellStyle?:CellStyle;visible?:boolean;renderer?:string;}interfaceColumn {key:string;header:string;width:number;type:CellFormat;numberFormat?:string;numberLocale?:string;headerStyle?:CellStyle;cellStyle?:CellStyle;visible?:boolean;renderer?:string;}Schema and default presentation for one workbook column.API reference →[]) =>void;
filterBy: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, needle:string) =>void;
getCell: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>ResolvedCellinterface ResolvedCell {
resolved: CellScalar;
style: CellStyle;
}interfaceResolvedCell {resolved:CellScalar;style:CellStyle;}interfaceResolvedCell {resolved:CellScalar;style:CellStyle;}Authoritative source value, evaluated value, style, and load state for a cell.API reference →;
getCellLoadState: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>CellLoadStatetype CellLoadState =
"unloaded" | "loaded-empty" | "loaded-value" | "local-edit";typeCellLoadState="unloaded"|"loaded-empty"|"loaded-value"|"local-edit";typeCellLoadState=|"unloaded"|"loaded-empty"|"loaded-value"|"local-edit";Datasource loading state for a resolved cell.API reference →;
getClipboardWindow: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
viewRows: {
start:number;
end:number;
},
cols:readonlynumber[],
) =>ClipboardWindowView;
getDataWindow: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
rows: {
start:number;
end:number;
},
cols:readonlynumber[],
) =>VisibleWindowViewinterface VisibleWindowView {
sheet: SheetId;
rows: { start: number; end: number };
cols: readonly number[];
values: ArrayLike<CellScalar>;
styleIds: Uint32Array;
styles: readonly CellStyle[];
valueKinds?: Uint8Array;
numberValues?: Float64Array;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
}interfaceVisibleWindowView {sheet:SheetId;rows: { start:number; end:number };cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}interfaceVisibleWindowView {sheet:SheetId;rows: {start:number;end:number;};cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call. The renderer paints from this view and MUST NOT call Store.getCell per cell. styleIds are view-local indices into this view's compact styles dictionary; on the worker renderer path, styleIds.buffer is transferred during paint, so main-thread code must not read it after paint. Lifetime: valid until the next store mutation or window refresh.API reference →;
getFormula: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>string|null;
getPagedStats: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>PagedStoreStatsinterface PagedStoreStats {
chunks: number;
loadedCells: number;
dirtyCells: number;
allocatedBytes: number;
fullyLoaded: boolean;
}interfacePagedStoreStats {chunks:number;loadedCells:number;dirtyCells:number;allocatedBytes:number;fullyLoaded:boolean;}interfacePagedStoreStats {chunks:number;loadedCells:number;dirtyCells:number;allocatedBytes:number;fullyLoaded:boolean;}Allocation and load statistics for one paged datasource sheet.API reference →;
getRefTarget: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →|null;
getVisibleWindow: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
rows: {
start:number;
end:number;
},
cols:readonlynumber[],
) =>VisibleWindowViewinterface VisibleWindowView {
sheet: SheetId;
rows: { start: number; end: number };
cols: readonly number[];
values: ArrayLike<CellScalar>;
styleIds: Uint32Array;
styles: readonly CellStyle[];
valueKinds?: Uint8Array;
numberValues?: Float64Array;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
}interfaceVisibleWindowView {sheet:SheetId;rows: { start:number; end:number };cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}interfaceVisibleWindowView {sheet:SheetId;rows: {start:number;end:number;};cols:readonlynumber[];values:ArrayLike<CellScalar>;styleIds:Uint32Array;styles:readonlyCellStyle[];valueKinds?:Uint8Array;numberValues?:Float64Array;stringPoolIds?:Uint32Array;stringLocalIds?:Int32Array;stringPoolUpdateIds?:Uint32Array;stringPoolUpdateValues?:readonlystring[];localStrings?:readonlystring[];ffiCalls?:number;}One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call. The renderer paints from this view and MUST NOT call Store.getCell per cell. styleIds are view-local indices into this view's compact styles dictionary; on the worker renderer path, styleIds.buffer is transferred during paint, so main-thread code must not read it after paint. Lifetime: valid until the next store mutation or window refresh.API reference →;
getWorkbook: () =>Workbookinterface Workbook {
sheets: Sheet[];
activeSheet: SheetId;
namedRanges?: NamedRangeSnapshot[];
}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}interfaceWorkbook {sheets:Sheet[];activeSheet:SheetId;namedRanges?:NamedRangeSnapshot[];}Live workbook schema containing ordered sheets and the active sheet ID.API reference →;
groupRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, end:number) =>void;
hasView: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>boolean;
hiddenRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>number[];
hideRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows:readonlynumber[]) =>void;
isPaged: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>boolean;
isRangeFullyLoaded: (input:Rangeinterface Range {
sheet: SheetId;
start: { row: number; col: number };
end: { row: number; col: number };
}interfaceRange {sheet:SheetId;start: { row:number; col:number };end: { row:number; col:number };}interfaceRange {sheet:SheetId;start: {row:number;col:number;};end: {row:number;col:number;};}Inclusive rectangular cell range on a stable sheet ID.API reference →) =>boolean;
loadRows: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
protect?: (addr:CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →) =>boolean,
) =>void;
on: (_evt:"change", fn:ChangeListener) => () =>void;
queryCapability: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>QueryCapabilitytype QueryCapability =
| { status: "complete" }
| {
status: "incomplete";
loadedCells: number;
totalCells: number;
};typeQueryCapability=| { status:"complete" }| {status:"incomplete";loadedCells:number;totalCells:number;};typeQueryCapability=| { status:"complete" }| {status:"incomplete";loadedCells:number;totalCells:number;};Whether a query is complete for the currently loaded datasource pages.API reference →;
recalculateVolatile: (now?:Date) =>void;
removeSheetFormulaIdentity: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>boolean;
renameSheetFormulaIdentity: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, name:string) =>boolean;
resetRangeMutationAllocationStats: () =>void;
rowGroups: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>readonlyRowGroupinterface RowGroup {
start: number;
end: number;
collapsed: boolean;
}interfaceRowGroup {start:number;end:number;collapsed:boolean;}interfaceRowGroup {start:number;end:number;collapsed:boolean;}A collapsible row group (data-row range, end-inclusive), Sheets-style.API reference →[];
searchCells: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
query:string,
opts?: {
matchCase?:boolean;
wholeCell?:boolean;
columns?:number[];
},
) =>CellAddressinterface CellAddress {
sheet: SheetId;
row: number;
col: number;
}interfaceCellAddress {sheet:SheetId;row:number;col:number;}interfaceCellAddress {sheet:SheetId;row:number;col:number;}Zero-based address of one cell on a stable sheet ID.API reference →[];
searchCellsFlat: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
query:string,
opts?: {
matchCase?:boolean;
wholeCell?:boolean;
columns?:number[];
},
) =>Uint32Array;
setColumnFilter: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
col:number,
filter:ColumnFiltertype ColumnFilter =
| { kind: "values"; values: readonly CellScalar[] }
| { kind: "contains"; text: string; matchCase?: boolean }
| {
kind: "compare";
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
value: number;
}
| { kind: "empty" }
| { kind: "nonEmpty" };typeColumnFilter=| { kind:"values"; values:readonlyCellScalar[] }| { kind:"contains"; text:string; matchCase?:boolean }| {kind:"compare";op:"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| { kind:"empty" }| { kind:"nonEmpty" };typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:|"gt"|"gte"|"lt"|"lte"|"eq"|"neq";// … 4 more lines — see the API reference}One column's filter predicate. All active column filters AND together; matching is against the cell's resolved value (text or number).API reference →|null,
) =>void;
setGroupCollapsed: (
sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →,
mode?:MutationPolicyModetype MutationPolicyMode = "atomic" | "partial";typeMutationPolicyMode="atomic"|"partial";typeMutationPolicyMode="atomic"|"partial";Atomic or partial handling for locally denied operations.API reference →,
) =>void;
showRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, rows?:readonlynumber[]) =>void;
sortBy: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, col:number, ascending:boolean) =>void;
sortByMulti: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, keys:readonlySortKeyinterface SortKey {
col: number;
ascending: boolean;
}interfaceSortKey {col:number;ascending:boolean;}interfaceSortKey {col:number;ascending:boolean;}One key of a multi-column sort, applied in array order (first = primary).API reference →[]) =>void;
ungroupRows: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, start:number, end:number) =>void;
viewRowCount: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →) =>number;
viewRowOf: (sheet:SheetIdtype SheetId = string;typeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →, dataRow:number) =>number|null;
staticfromSnapshot: (
input:unknown,
options?:SheetwriteStoreOptionsinterface SheetwriteStoreOptions {
snapshotResourceLimits?: Partial<SnapshotResourceLimits>;
transactionResourceLimits?: Partial<TransactionResourceLimits>;
storage?: "dense" | "paged";
chunkRows?: number;
cacheBytes?: number;
protectionResolver?: ProtectionResolver;
mutationPolicy?: MutationPolicyMode;
}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}interfaceSheetwriteStoreOptions {snapshotResourceLimits?:Partial<SnapshotResourceLimits>;transactionResourceLimits?:Partial<TransactionResourceLimits>;storage?:"dense"|"paged";chunkRows?:number;cacheBytes?:number;protectionResolver?:ProtectionResolver;mutationPolicy?:MutationPolicyMode;}Storage layout plus snapshot and transaction resource ceilings for one store.API reference →,