https://issues.apache.org/bugzilla/show_bug.cgi?id=56781

            Bug ID: 56781
           Summary: XSSFName.validateName(String) Only Checks for the
                    First Character's Validity and Presence of Spaces
           Product: POI
           Version: 3.9
          Hardware: PC
                OS: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]

XSSFName.validateName(String) (and HSSFName.validateName(String)) each validate
name input for named ranged (when set via "setNameName(String)'). This
validation only checks that the first character is an underscore or letter, and
that there are no spaces in the name. 

This does not prevent other invalid characters (such as '-') from being used
within the body of the name. Upon opening the file in Excel 2010, excel claims
there is corrupted data and attempts repair (which consists of removing the
offending named range(s), after which the file is readable without issue)

Both of these validation methods should check the full length of the name for
invalid characters. 

There is a forum post in the excel forums with someone asking what the valid
useable chracters are. The most relevant response was:

"From Excel Help:

What characters are allowed? The first character of a name must be a letter, an
underscore character (_), or a backslash (\).
Remaining characters in the name can be letters, numbers, periods, and
underscore characters."

There are additional restrictions documented in the javadoc of
HSSFName.setNameName and XSSFName.setNameName, such as maximum length.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to