Get Started
Usage API

GetIndex

GetIndex() → { number }

Get sheet index

Parameters:

This method doesn't have any parameters.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oIndex = oWorksheet.GetIndex();
oWorksheet.GetRange("A1").SetValue("Index: ");
oWorksheet.GetRange("B1").SetValue(oIndex);
builder.SaveFile("xlsx", "GetIndex.xlsx");
builder.CloseFile();

Resulting document