Bug 22454

Summary: Throw exception when creating sheet with a duplicate name
Product: POI Reporter: Willem MOORS <willem>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: willem
Priority: P3    
Version: 2.0-pre3   
Target Milestone: ---   
Hardware: Other   
OS: Linux   

Description Willem MOORS 2003-08-15 11:49:51 UTC
MS-Excell can open/edit a POI/HSSF generated spreadsheet that contains sheets
with duplicate names, but on closing or saving the spreadsheet it crashes
everytime (version tested: Excel 2000, 9.0.3821 SR-1). 

Solution: avoid creating sheets with duplicate names by letting method
workBook.createSheet(sheetName) throw an exception when it creates a sheet with
a name that already exists.
Comment 1 Jason Height 2005-08-26 04:34:10 UTC
Done some time ago:

java.lang.IllegalArgumentException: The workbook already contains a sheet of
this name
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.createSheet(HSSFWorkbook.java:388)


Jason