|Summary:||[PATCH] create safe strings for sheet names utility class|
|Component:||HSSF||Assignee:||POI Developers List <dev>|
|Attachments:||SVN patch file, against r981695|
Description maki 2010-08-02 18:16:14 UTC
Created attachment 25829 [details] SVN patch file, against r981695 When creating or renaming sheet names within a workbook, there are some rules to consider to avoid Exceptions. Such rules are max. length is 31 characters or no special characters allowed. So nearly every one developer who allows users to enter sheet names has to write some kind of validation code or transforming code. Such code guarantees correct names and avoids Exceptions. This patch contains a new util class org.apache.poi.hssf.util.WorkbookUtil which contains a method String createSafeSheetName(final String nameProposal). Along with some Javadoc enhancements a JUnit test is also included.