Get Started
Usage API
More information

GetWorksheet

GetWorksheet() → { ApiWorksheet }

Return a Worksheet object that represents the worksheet containing the specified range. Read-only.

Parameters:

This method doesn't have any parameters.

Returns:

Type
ApiWorksheet

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oRange = oWorksheet.GetRange("A1:C1");
oRange.SetValue("1");
oSheet = oRange.GetWorksheet();
oWorksheet.GetRange("A3").SetValue("Worksheet name: " + oSheet.GetName());
builder.SaveFile("xlsx", "GetWorksheet.xlsx");
builder.CloseFile();

Resulting document