Skip to content
Spreadsheet Engine

DefinedName

DefinedName object. Instances of this are stored in Workbook._globals and WorkSheet._locallyScopedNames.

new DefinedName(
orgCell,
name?,
container?): DefinedName;

Construct a DefinedName instance.

| DefinedName | { f?: string; }

object to copy attributes from (all optional, this may be empty)

string | null

the name of the defined name

CellContainer

DefinedName

f: string | null;

formula, if any

CellInterface.f


ft: "a";

Formula type is always ‘a’ for defined names.

CellInterface.ft


id: string;

this defined name’s name

CellInterface.id

get formulaZ(): string | null;

The defined name’s formula-assigned number format, if present.

string | null

CellInterface.formulaZ


get isExtractedSubexpression(): boolean;

Whether this defined name contains a subexpression the optimizer hoisted out of the formulas that repeat it, as opposed to the other internal kind, a cached formula. Extraction affects only how those formulas evaluate; their f text is unchanged. See Docs.InternalDefinedNames.

boolean


get isInternal(): boolean;

Whether this defined name is an internal implementation detail (cached formula cell or extracted subexpression) that should not be serialized or exposed to users. See Docs.InternalDefinedNames.

Both kinds are found by hashing their formula, so neither is ever rewritten in place.

boolean


get sheetIndex(): number | null;

number | null

CellInterface.sheetIndex


get v(): FormulaValue;

FormulaValue

set v(value): void;

Set the value of the defined name. If the value is a boxed value, the number format will become the defined name’s formula-assigned number format.

MaybeBoxedFormulaValue

void

CellInterface.v


get valueBoxed(): MaybeBoxedFormulaValue;

The value of the defined name. If the value has a formula-assigned number format, the value will be a boxed value containing that number format.

MaybeBoxedFormulaValue

CellInterface.valueBoxed


get workbookKey(): number;

number

CellInterface.workbookKey


get z(): string | null;

The effective number format of the defined name. Null unless propagated from number formats of referenced cells.

string | null

CellInterface.z

clear(): void;

void

CellInterface.clear


edit(cellData): void;

JSFCellExpanded

void

CellInterface.edit


hasValueOrFormula(): boolean;

boolean

CellInterface.hasValueOrFormula


isSpillAnchor(): boolean;

boolean

CellInterface.isSpillAnchor


isSpilled(): this is Cell & { _spill: { valid: true }; F: string; sheetIndex: number };

this is Cell & { _spill: { valid: true }; F: string; sheetIndex: number }

CellInterface.isSpilled


spillHeight(): number;

number

CellInterface.spillHeight


spillWidth(): number;

number

CellInterface.spillWidth


toString(): string;

string

CellInterface.toString