Bug 49875 - Different behaviour with invalid sheet names between HSSF and XSSF
Summary: Different behaviour with invalid sheet names between HSSF and XSSF
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.7-dev
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 07:26 UTC by Martin Studer
Modified: 2010-09-04 11:57 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Studer 2010-09-03 07:26:42 UTC
When trying to create a sheet with an invalid name (e.g. having a (') at the beginning or the end) with HSSF, then this creates an exception like "Invalid sheet name ''Invalid Sheet Name'. Sheet names must not begin or end with (').". I would consider this as expected and reasonable behaviour. With XSSF, however, no such exception is produced. But when trying to open the created Excel file, Excel shows a dialog box saying that non-readable content has been found and asks whether Excel should recover the content.

I would except HSSF and XSSF to behave the same way and throw an exception when trying to create a sheet with an invalid name.


The above behaviour can be reproduced by using the workbook.createSheet function.


OS: Windows 7 64bit
POI: 3.7-beta2
Java: 1.6.0_20 64bit
Comment 1 Yegor Kozlov 2010-09-04 11:57:21 UTC
Fixed in r992629

Regards,
Yegor