Click or drag to resize

ExcelWorksheetCollectionAdd Method (SheetType, String)

Adds an empty worksheet to the end of the collection.

Namespace:  GemBox.Spreadsheet
Assembly:  GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1128
Syntax
public ExcelWorksheet Add(
	SheetType type,
	string worksheetName
)

Parameters

type
Type: GemBox.SpreadsheetSheetType
The sheet type.
worksheetName
Type: SystemString
Worksheet name.

Return Value

Type: ExcelWorksheet
Newly created worksheet.
Exceptions
ExceptionCondition
ArgumentExceptionWorksheet name is not unique.
Remarks
If this is the first worksheet added to the collection the ActiveWorksheet is set to this worksheet.
See Also