Get Started
Usage API

GetCount

GetCount() → { Number }

Get count rows or columns

Parameters:

This method doesn't have any parameters.

Returns:

Type
Number

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("B1").SetValue("2");
oWorksheet.GetRange("C1").SetValue("3");
oCount = oWorksheet.GetRange("A1:C1").GetCount();
oWorksheet.GetRange("A4").SetValue("Count: ");
oWorksheet.GetRange("B4").SetValue(oCount);
builder.SaveFile("xlsx", "GetCount.xlsx");
builder.CloseFile();

Resulting document