ROWS

function ROWS(arg1: ApiRange = null): number | string | boolean

Description

Returns the number of rows in a reference or array.

Parameters

arg1ApiRangedefault: null

Is an array, an array formula, or a reference to a range of cells for which you want the number of rows.

Returns

number | string | boolean

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var column1 = [13, 14, 15];
var column2 = [23, 24, 25];

for (var i = 0; i < column1.length; i++) {
   oWorksheet.GetRange("A" + (i + 1)).SetValue(column1[i]);
}
for (var j = 0; j < column2.length; j++) {
   oWorksheet.GetRange("B" + (j + 1)).SetValue(column2[j]);
}

var oRange = oWorksheet.GetRange("A1:B3");
oWorksheet.GetRange("C3").SetValue(oFunction.ROWS(oRange));

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).