Workbook.AddWorksheet Method (String, Boolean)

PicoXLSX

PicoXLSX

WorkbookAddWorksheet Method (String, Boolean)

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

Namespace:  PicoXLSX
Assembly:  PicoXLSX (in PicoXLSX.dll) Version: 2.4.0.0 (2.4.0)
Syntax
C#
public void AddWorksheet(
	string name,
	bool sanitizeSheetName
)

Parameters

name
Type: SystemString
Name of the new worksheet
sanitizeSheetName
Type: SystemBoolean
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