Get Started
Usage API
More information

GetName

GetName() → { string }

Returns a sheet name.

Parameters:

This method doesn't have any parameters.

Returns:

Type
string

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
sName = oWorksheet.GetName();
oWorksheet.GetRange("A1").SetValue("Name: ");
oWorksheet.GetRange("B1").SetValue(sName);
builder.SaveFile("xlsx", "GetName.xlsx");
builder.CloseFile();

Resulting document