GetRows

function GetRows(nRow: number = null): ApiRange | "null"

Description

Returns a Range object that represents the rows in the specified range. If the specified row is outside the Range object, a new Range will be returned that represents the cells between the columns of the original range in the specified row.

Parameters

nRownumberdefault: null

The row number (starts counting from 1, the 0 value returns an error).

Returns

ApiRange | "null"

Try It

var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("1:3");
for (var i=1; i <= 3; i++) {
   var oRows = oRange.GetRows(i);    
   oRows.SetValue(i);
}

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).