CellVertexId
Vertex ID representing a cell in a sheet.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CellVertexId( workbookKey, sheetIndex, rowIndex, colIndex): CellVertexId;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
rowIndex
Section titled “rowIndex”number
Zero-based row index
colIndex
Section titled “colIndex”number
Zero-based column index
Returns
Section titled “Returns”CellVertexId
Overrides
Section titled “Overrides”Properties
Section titled “Properties”colIndex
Section titled “colIndex”colIndex: number;Zero-based index of the column containing this cell (e.g. 2 for column C of C5).
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”rowIndex
Section titled “rowIndex”rowIndex: number;Zero-based index of the row containing this cell (e.g. 4 for row 5 of C5).
sheetIndex
Section titled “sheetIndex”sheetIndex: number;Zero-based index of the worksheet containing this cell
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”Accessors
Section titled “Accessors”bottom
Section titled “bottom”Get Signature
Section titled “Get Signature”get bottom(): number;Zero-based row index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get left(): number;Zero-based column index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get right(): number;Zero-based column index
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get top(): number;Zero-based row index
Returns
Section titled “Returns”number
Methods
Section titled “Methods”contains()
Section titled “contains()”contains(otherId): boolean;Check whether this vertex ID fully contains another (meaning all of the other vertex ID is within this one)
Parameters
Section titled “Parameters”otherId
Section titled “otherId”Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”offset()
Section titled “offset()”offset(rows, cols): CellVertexId;Get a cell vertex ID at the given offset from this one, in the same sheet.
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”CellVertexId
overlaps()
Section titled “overlaps()”overlaps(otherId): boolean;Check whether this range overlaps another vertex ID.
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;Top-left cell
Returns
Section titled “Returns”CellVertexId
this
toRange()
Section titled “toRange()”toRange(): Range;Derive a bare Range for the cell 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 this cell vertex ID with the given callback if it is within the given 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
withCoordinates()
Section titled “withCoordinates()”withCoordinates(x, y): CellVertexId;Get a cell vertex ID for the given coordinates in the same sheet as this one.
Parameters
Section titled “Parameters”number
zero-based column index
number
zero-based row index
Returns
Section titled “Returns”CellVertexId
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