Method Normalize
Normalize(string?, string)
Derives a legal worksheet name from arbitrary text.
public static string Normalize(string? text, string fallback)
Parameters
textstringThe text, which may be null, empty or illegal.
fallbackstringThe name to use when nothing usable survives.
Returns
- string
A name IsValid(string?) accepts.
Remarks
Forbidden characters become spaces rather than being deleted, so two names that differ
only in punctuation stay different; the result is trimmed, truncated to
MaxLength and replaced by fallback when it comes out
empty. Uniqueness across a workbook is the caller's to arrange — this method cannot see
the other sheets.