GemBox.Spreadsheet

ExcelWorksheetCollection.Add Method 

Adds an empty worksheet to the end of the collection.

public ExcelWorksheet Add(
   string worksheetName
);

Parameters

worksheetName
Worksheet name.

Return Value

Newly created worksheet.

Remarks

If this is the first worksheet added to the collection the ActiveWorksheet is set to this worksheet.

Exceptions

Exception Type Condition
ArgumentException Thrown if worksheet name is not unique.

See Also

ExcelWorksheetCollection Class | GemBox.Spreadsheet Namespace