GetRangeByNumber
Returns an object that represents the selected range of the current sheet using the - row/column coordinates for the cell selection.
Syntax
expression.GetRangeByNumber(nRow, nCol);
expression - A variable that represents a ApiWorksheet class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| nRow | Required | number | The row number. | |
| nCol | Required | number | The column number. |
Returns
Example
Locate a cell using row and column numbers instead of letters in a spreadsheet.
// Pick cells by their numeric positions without using address notation in a spreadsheet?
// Enter data into a cell when you know only its row and column count in a spreadsheet.
let worksheet = Api.GetActiveSheet();
worksheet.GetRangeByNumber(1, 2).SetValue("42");