Summary: | XSSFName.validateName(String) Only Checks for the First Character's Validity and Presence of Spaces | ||
---|---|---|---|
Product: | POI | Reporter: | Ryan O'Meara <romeara> |
Component: | XSSF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.9-FINAL | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Mac OS X 10.4 | ||
Bug Depends on: | |||
Bug Blocks: | 60246 |
Description
Ryan O'Meara
2014-07-28 21:55:00 UTC
Side note: If I manage to get the POI environment setup, I'd be willing to take a crack at a patch for this http://poi.apache.org/howtobuild.html and http://poi.apache.org/guidelines.html should hopefully cover you on getting started to contribute FormulaParser currently has logic for deciding if a sequence of characters is a valid (anything) for a formula, my first hunch is it might be possible to perhaps re-use the name validating parts of that? That Excel help forum may not be reputable (for example, unicode characters are allowed, allowing backslash as the first character but not subsequent characters raises flags). Better would be documentation from Microsoft on allowed names in Excel 97-2003 and 2007+. This would need to be verified using Excel (preferably these files could be used for POI unit tests). I made up a regular expression that validates the entire string in r1749293. This regular expression will likely need tweaking to match Excel's rules. Reverted back to using Character.isLetter in r1749305 because Regular Expressions \p{IsAlphabetic} metaclass is not supported in Java 6. |