CellsHelper.CreateSafeSheetName

CreateSafeSheetName(string)

Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet name, then return it. Otherwise string will be truncated if length exceeds the limit and invalid characters will be replaced with ’ ‘, then return the rebuilt string value.

public static string CreateSafeSheetName(string nameProposal)
ParameterTypeDescription
nameProposalStringsheet name to be used

See Also


CreateSafeSheetName(string, char)

Checks given sheet name and create a valid one when needed. If given sheet name conforms to the rules of excel sheet name, then return it. Otherwise string will be truncated if length exceeds the limit and invalid characters will be replaced with given character, then return the rebuilt string value.

public static string CreateSafeSheetName(string nameProposal, char replaceChar)
ParameterTypeDescription
nameProposalStringsheet name to be used
replaceCharCharcharacter which will be used to replace invalid characters in given sheet name

See Also