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
)
Public Function GetSafeSheetName (
inputName As String,
replaceChar As Char
) As String
public:
String^ GetSafeSheetName(
String^ inputName,
wchar_t replaceChar
)
member GetSafeSheetName :
inputName : string *
replaceChar : char -> string
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