WorksheetCollection.AddCopy

AddCopy(string)

Adds a worksheet to the collection and copies data from an existed worksheet.

public int AddCopy(string sheetName)
ParameterTypeDescription
sheetNameStringName of source worksheet.

Return Value

Worksheet object index.

Exceptions

exceptioncondition
CellsExceptionSpecifies an invalid worksheet name.

See Also


AddCopy(int)

Adds a worksheet to the collection and copies data from an existed worksheet.

public int AddCopy(int sheetIndex)
ParameterTypeDescription
sheetIndexInt32Index of source worksheet.

Return Value

Worksheet object index.

See Also


AddCopy(Worksheet[], string[])

Copy a group of worksheets.

public void AddCopy(Worksheet[] source, string[] destSheetNames)
ParameterTypeDescription
sourceWorksheet[]The source worksheets.
destSheetNamesString[]The names of the copied sheets.

See Also