Click or drag to resize
PicoXLSX

WorkbookCopyWorksheetIntoThis(Int32, String, Boolean) Method

Copies a worksheet of the current workbook by its index

Namespace: PicoXLSX
Assembly: PicoXLSX (in PicoXLSX.dll) Version: 3.4.5+3a069966d2787c42b695e5043a5e083b247634e3
Syntax
C#
public Worksheet CopyWorksheetIntoThis(
	int sourceWorksheetIndex,
	string newWorksheetName,
	bool sanitizeSheetName = true
)

Parameters

sourceWorksheetIndex  Int32
Index of the worksheet to copy, originated in this workbook.
newWorksheetName  String
Name of the new worksheet (copy).
sanitizeSheetName  Boolean  (Optional)
If true, the new name will be automatically sanitized if a name collision occurs.

Return Value

Worksheet
Copied worksheet.
See Also