Click or drag to resize

Workbook GetSafeSheetName Method (String, Char)

Safely converts the input worksheet name by replacing restricted characters and truncating if necessary.

Namespace: Spire.Xls
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public string GetSafeSheetName(
	string inputName,
	char replaceChar
)

Parameters

inputName
Type: System String
The original worksheet name to be sanitized.
replaceChar
Type: System Char
The character to replace restricted characters with.

Return Value

Type: String
A sanitized worksheet name that is safe to use in Excel.
Exceptions
Exception Condition
ArgumentOutOfRangeException Thrown when the inputName is null or empty.
See Also