Get Started
Documentation

AddSheet

AddSheet(sName)

Creates a new worksheet. The new worksheet becomes the active sheet.

Parameters:

Name Type Description
sName string

Example

Copy code
builder.CreateFile("xlsx");
oWorksheet = Api.GetActiveSheet();
oSheet = Api.AddSheet("New sheet");
builder.SaveFile("xlsx", "AddSheet.xlsx");
builder.CloseFile();

Resulting document