CellInterface
Common interface for cell-like objects (Cell and DefinedName). Defines the shared properties and methods between cells in sheets and defined names.
Properties
Section titled “Properties”f: string | null;formula, if any
ft?: "a" | "cse" | "plain" | null;Formula type:
'a': dynamic-array formula (auto-resizing spill)'cse': legacy Ctrl-Shift-Enter array formula (fixed output range)'plain': formula loaded from a file without an array mark (a plain<f>in XLSX, noFin JSF), outside Google Sheets mode; evaluated by Excel’s pre-dynamic-array rules- absent/
null: the default type, which a newly entered formula has; evaluated by dynamic-array rules, except in Google Sheets mode, where it is a single-cell formula
id: string;this cell’s address ID in A1 format (unprefixed), or defined name
Accessors
Section titled “Accessors”formulaZ
Section titled “formulaZ”Get Signature
Section titled “Get Signature”get formulaZ(): string | null;The cell’s formula-assigned number format, if present.
Returns
Section titled “Returns”string | null
sheetIndex
Section titled “sheetIndex”Get Signature
Section titled “Get Signature”get sheetIndex(): number | null;Returns
Section titled “Returns”number | null
Get Signature
Section titled “Get Signature”get v(): | string | number | boolean | FormulaError | Lambda | Reference | MultiAreaReference | Matrix | null;Returns
Section titled “Returns”| string
| number
| boolean
| FormulaError
| Lambda
| Reference
| MultiAreaReference
| Matrix
| null
Set Signature
Section titled “Set Signature”set v(value): void;Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
valueBoxed
Section titled “valueBoxed”Get Signature
Section titled “Get Signature”get valueBoxed(): MaybeBoxedFormulaValue;The value of the cell. If the cell’s value has a formula-assigned number format, the value will be a boxed value containing that number format.
Returns
Section titled “Returns”workbookKey
Section titled “workbookKey”Get Signature
Section titled “Get Signature”get workbookKey(): number;Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get z(): string | null;The effective number format of the cell.
The effective number format is the user-assigned number format, if present. Otherwise, it is the formula-assigned number format.
Returns
Section titled “Returns”string | null
Methods
Section titled “Methods”clear()
Section titled “clear()”clear(): void;Returns
Section titled “Returns”void
hasValueOrFormula()
Section titled “hasValueOrFormula()”hasValueOrFormula(): boolean;Returns
Section titled “Returns”boolean
isSpillAnchor()
Section titled “isSpillAnchor()”isSpillAnchor(): boolean;Returns
Section titled “Returns”boolean
isSpilled()
Section titled “isSpilled()”isSpilled(): this is Cell & { _spill: { valid: true }; F: string; sheetIndex: number };Returns
Section titled “Returns”this is Cell & { _spill: { valid: true }; F: string; sheetIndex: number }
spillHeight()
Section titled “spillHeight()”spillHeight(): number;Returns
Section titled “Returns”number
spillWidth()
Section titled “spillWidth()”spillWidth(): number;Returns
Section titled “Returns”number
toString()
Section titled “toString()”toString(): string;Returns
Section titled “Returns”string