Click or drag to resize
ExcelWorksheetCollectionAddCopy Method
Adds a copy of an existing worksheet to the end of the collection.

Namespace: GemBox.Spreadsheet
Assembly: GemBox.Spreadsheet (in GemBox.Spreadsheet.dll) Version: 41.3.30.1000
Syntax
public ExcelWorksheet AddCopy(
	string destinationWorksheetName,
	ExcelWorksheet sourceWorksheet
)

Parameters

destinationWorksheetName
Type: SystemString
Name of new worksheet.
sourceWorksheet
Type: GemBox.SpreadsheetExcelWorksheet
Source worksheet.

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