Click or drag to resize
PicoXLSX

WorkbookCopyWorksheetTo(String, String, Workbook, Boolean) Method

Copies a worksheet of the current workbook by its name into another workbook

Namespace: PicoXLSX
Assembly: PicoXLSX (in PicoXLSX.dll) Version: 3.4.2+f55916d49ef2baa43fc7dc8f5c7d751a77c50baf
Syntax
C#
public Worksheet CopyWorksheetTo(
	string sourceWorksheetName,
	string newWorksheetName,
	Workbook targetWorkbook,
	bool sanitizeSheetName = true
)

Parameters

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

Return Value

Worksheet
Copied worksheet.
See Also