Bug 13921

Summary: Sheet name cannot exceed 31 characters and cannot contain : \ / ? * [ ] characters
Product: POI Reporter: Anastasios Georgousakis <tgeor>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Anastasios Georgousakis 2002-10-24 09:15:40 UTC
If you set a name in a sheet larger that 31 characters and then try to open the 
generated file makes Excel crash. 

The rules for Excel sheet name is that it cannot be larger than 31 characters, 
it cannot contain the following characters : \ / ? * [ ] and cannot be blank. 
You can see this rules if you try to rename a sheet name in an excel 
spreadsheet and leave it blank.

To avoid Excel crashes I think the HSSF api must check this rules.
Comment 1 Andy Oliver 2003-07-24 13:41:33 UTC
you're right.
Comment 2 Avik Sengupta 2003-10-09 19:33:08 UTC
Fixed, thanks. Please crosscheck from CVS. 

This might break *some* existing programs that were using illegal sheet names,
but were not opening the resulting file in excel. Unlikely, but possible.
However, since Excel crashing is considered to be bug, this should be fixed.
Also, the exception message should be self explanatory.