Get Started
Documentation

GetRangeByNumber

GetRangeByNumber(nRow, nCol) → {ApiRange}

Returns an object that represents the selected range of the current sheet using the row/column coordinates for the cell selection.

Parameters:

Name Type Description
nRow number The number of the row to set the cell coordinates.
nCol number The number of the column to set the cell coordinates.

Returns:

Type
ApiRange

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRangeByNumber(1, 2).SetValue("42");
builder.SaveFile("xlsx", "GetRangeByNumber.xlsx");
builder.CloseFile();

Resulting document