Bug 20696

Summary: [PATCH] Workbook.getSheetIndex() needs to ignore case.
Product: POI Reporter: Eric Ladner <eladner>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: All   

Description Eric Ladner 2003-06-12 00:57:04 UTC
I have seen several instances of xls files created natively in Excel that have
problems retrieving sheet names by the sheet number.  Apparently, Excel treats
sheet names as case insensitive.  Patch below (created aginst a recent cvs diff)

Index: jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java
===================================================================
RCS file:
/home/cvspublic/jakarta-poi/src/java/org/apache/poi/hssf/model/Workbook.java,v
retrieving revision 1.29
diff -r1.29 Workbook.java
516c519
<             if (sheet.equals(name)) {
---
>             if (sheet.equalsIgnoreCase(name)) {
Comment 1 Avik Sengupta 2003-07-01 14:55:07 UTC
Seems fine.. committed.