Skip to content

NameVertexId

Vertex ID representing a defined name. Workbook-scoped if sheetIndex is null, else scoped to the given cell.

new NameVertexId(
workbookKey,
sheetIndex,
name): NameVertexId;

number

The dependency graph key of the workbook

number | null

Zero-based sheet index (if name is sheet-scoped, else null)

string

The defined name

NameVertexId

VertexId.constructor

key: string;

Underlying string encoding of the identifier. Guaranteed to be identical for two vertex ID instances that identify the same thing within a model, and to be distinct for instances that don’t.

VertexId.key


name: string;

Name, as specified when this vertex ID was constructed. Note that vertex IDs with different casing of the name are equivalent.


sheetIndex: number | null;

Zero-based index of sheet, if this represents a sheet-scoped defined name


workbookKey: number;

Key identifying a workbook in this model. Although it is numeric, the number does not necessarily indicate its ordering in the model.

VertexId.workbookKey

contains(otherId): boolean;

Check whether this vertex ID fully contains another (meaning all of the other vertex ID is within this one)

KnownVertexId

boolean

VertexId.contains


overlaps(otherId): boolean;

Check whether this vertex ID overlaps another.

KnownVertexId

boolean

VertexId.overlaps


toRange(): Range | null;

Derive a bare Range for the cell or range represented by this vertex ID, without workbook or sheet attachment. For a vertex ID that does not represent a cell or range, this is null.

Range | null

VertexId.toRange


toString(): string;

string

VertexId.toString


static fromKey(key): KnownVertexId;

Make a VertexId instance for the given key. Two calls with the same key will return distinct but equivalent instances.

string

KnownVertexId

VertexId.fromKey