Click or drag to resize
NanoXLSX

WorkbookCopyWorksheetIntoThis(String, String, Boolean) Method

Copies a worksheet of the current workbook by its name

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.7+064d9a8047d8da6ad83b4776af2459e923cc7c3d
Syntax
C#
public Worksheet CopyWorksheetIntoThis(
	string sourceWorksheetName,
	string newWorksheetName,
	bool sanitizeSheetName = true
)

Parameters

sourceWorksheetName  String
Name 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
Remarks
The copy is not set as current worksheet. The existing one is kept
See Also