Get Started
Documentation

GetRangeByNumber

GetRangeByNumber(row, col) → { 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
row Number

The number of the row to set the cell coordinates.

col 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