RangeVertexId
Vertex ID representing a range in a sheet. Note: the range can be 1x1. Such a vertex ID is still not equivalent to the corresponding CellVertexId (though each overlaps and contains the other).
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RangeVertexId( workbookKey, sheetIndex, top, left, bottom, right): RangeVertexId;Parameters
Section titled “Parameters”workbookKey
Section titled “workbookKey”number
The dependency graph key of the workbook
sheetIndex
Section titled “sheetIndex”number
Zero-based sheet index
number
Zero-based row index
number
Zero-based column index
bottom
Section titled “bottom”number
Zero-based row index
number
Zero-based column index
Returns
Section titled “Returns”RangeVertexId
Overrides
Section titled “Overrides”Properties
Section titled “Properties”bottom
Section titled “bottom”bottom: number;Zero-based index of the bottom row of this range (3 for B2:D4)
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.
Inherited from
Section titled “Inherited from”left: number;Zero-based index of the leftmost column of this range (1 for B2:D4)
right: number;Zero-based index of the rightmost column of this range (3 for B2:D4)
sheetIndex
Section titled “sheetIndex”sheetIndex: number;Zero-based index of the worksheet containing this cell
top: number;Zero-based index of the top row of this range (1 for B2:D4)
workbookKey
Section titled “workbookKey”workbookKey: number;Key identifying a workbook in this model. Although it is numeric, the number does not necessarily indicate its ordering in the model.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”bottomRight()
Section titled “bottomRight()”bottomRight(): CellVertexId;Get a vertex ID representing the bottom-right cell of this range
Returns
Section titled “Returns”contains()
Section titled “contains()”contains(other): boolean;Check whether this range fully contains another vertex ID (meaning all cells of the other vertex ID are within this one).
False if not the same workbook and sheet.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”offset()
Section titled “offset()”offset(rows, cols): RangeVertexId;Get a range vertex ID at the given offset from this one, in the same sheet, with the same width and height.
Parameters
Section titled “Parameters”number
the number of rows to offset (negative for upward offset)
number
the number of columns to offset (negative for leftward offset)
Returns
Section titled “Returns”RangeVertexId
overlaps()
Section titled “overlaps()”overlaps(otherId): boolean;Check whether this range overlaps another vertex ID (meaning at least one cell of the other vertex ID is within this one).
False if not the same workbook and sheet.
Parameters
Section titled “Parameters”otherId
Section titled “otherId”Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”topLeft()
Section titled “topLeft()”topLeft(): CellVertexId;Get a vertex ID representing the top-left cell of this range
Returns
Section titled “Returns”toRange()
Section titled “toRange()”toRange(): Range;Derive a bare Range for the range represented by this vertex ID, without workbook or sheet attachment.
Returns
Section titled “Returns”Overrides
Section titled “Overrides”toString()
Section titled “toString()”toString(): string;Returns
Section titled “Returns”string
Inherited from
Section titled “Inherited from”visitCells()
Section titled “visitCells()”visitCells(callback, bounds?): void;Visit a cell vertex ID representing each cell of the range represented by this vertex ID, not exceeding the given bottom-right bounds.
Parameters
Section titled “Parameters”callback
Section titled “callback”CallbackWithStop<CellVertexId>
function to call with each cell vertex ID
bounds?
Section titled “bounds?”the maximum 0-based x and y coordinates to visit. If not specified, then all coordinates of this range vertex ID are visited.
bottom
Section titled “bottom”number
number
Returns
Section titled “Returns”void
fromKey()
Section titled “fromKey()”static fromKey(key): KnownVertexId;Make a VertexId instance for the given key. Two calls with the same key will return distinct but equivalent instances.
Parameters
Section titled “Parameters”string