Get Started
Documentation

SetName

SetName(sName)

Set a name to the current active sheet.

Parameters:

Name Type Description
sName string

The name which will be displayed for the current sheet at the sheet tab.

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oWorksheet.SetName("sheet 1");
builder.SaveFile("xlsx", "SetName.xlsx");
builder.CloseFile();

Resulting document