* <li>never null</li>
* <li>minimum length is 1</li>
* <li>maximum length is 31</li>
- * <li>doesn't contain special chars: / \ ? * ] [ </li>
+ * <li>doesn't contain special chars: : 0x0000, 0x0003, / \ ? * ] [ </li>
* <li>Sheet names must not begin or end with ' (apostrophe)</li>
* </ul>
* Invalid characters are replaced by one space character ' '.
for (int i=0; i<length; i++) {
char ch = result.charAt(i);
switch (ch) {
+ case '\u0000':
+ case '\u0003':
+ case ':':
case '/':
case '\\':
case '?':
actual = WorkbookUtil.createSafeSheetName("1234567890123456789012345678901TOOLONG");
assertEquals("1234567890123456789012345678901", actual);
+
+ actual = WorkbookUtil.createSafeSheetName("sheet:a4");
+ assertEquals("sheet a4", actual);
}
}