Class XlsxSheetName
The rules a worksheet name has to follow, and a normalizer for deriving one from arbitrary text.
public static class XlsxSheetName
- Inheritance
-
XlsxSheetName
- Inherited Members
Remarks
Excel's constraints are not documented in one place and each of them is a file Excel refuses to open rather than a cosmetic problem, so they are gathered here: a name is 1 to 31 characters; it may not contain a colon, backslash, forward slash, question mark, asterisk or either square bracket; and it may not begin or end with an apostrophe, because a sheet reference quotes the name with apostrophes and a leading one would terminate the quote.
Fields
- MaxLength
The longest a worksheet name may be.
Methods
- IsValid(string?)
Returns whether a name is one Excel accepts.
- MakeUnique(string, ICollection<string>)
Makes a name unique within a set of names already taken, by appending a number.
- Normalize(string?, string)
Derives a legal worksheet name from arbitrary text.