Click or drag to resize
NanoXLSX

WorkbookAddWorksheet(String, Boolean) Method

Adding a new Worksheet with a sanitizing option. The new worksheet will be defined as current worksheet

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.3+98f265239ae8df4639650ecd7029244cc5e52dfc
Syntax
C#
public void AddWorksheet(
	string name,
	bool sanitizeSheetName
)

Parameters

name  String
Name of the new worksheet
sanitizeSheetName  Boolean
If true, the name of the worksheet will be sanitized automatically according to the specifications of Excel
Exceptions
ExceptionCondition
WorksheetExceptionWorksheetException is thrown if the name of the worksheet already exists and sanitizeSheetName is false
FormatExceptionFormatException is thrown if the worksheet name contains illegal characters or is out of range (length between 1 an 31) and sanitizeSheetName is false
See Also