excel validate sheet name
This function checks if the sheet name proposed can be used in Microsoft Excel. The sheet name must not contain at least 1 character and not more than 31 characters, and the following characters must not be used: * / ? [ ] : \
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
string | Proposed sheet name This sheet name will be checked |
Type | Description |
---|---|
boolean | Check OK true is returned if the proposed sheet name is OK for Excel. |
good examples[] = { "Table 1", "T.1", "It contains 31 Characters .....", "1", "Section §1 - About Cafés" };
bad examples[] = { "", "a/b", "Section 1:1", "It contains 32 Characters ......", Two + new line + lines };
for all( good examples[], st[] ) print( excel validate sheet name( st[] ), " " );
echo;
for all( bad examples[], st[] ) print( excel validate sheet name( st[] ), " " );
echo;
true true true true true
false false false false false