You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/04/28 20:02:26 UTC

DO NOT REPLY [Bug 44892] New: HSSFWorkbook.getSheet(String name) is case sensitive, but it should not be

https://issues.apache.org/bugzilla/show_bug.cgi?id=44892

           Summary: HSSFWorkbook.getSheet(String name) is case sensitive,
                    but it should not be
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P1
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: a.degoy@jump-informatique.com


Version : 3.0.2-20080204

In HSSFWorkbook the getSheet function is case sensitive :
"
  public HSSFSheet getSheet(String name)
    {
        HSSFSheet retval = null;

        for (int k = 0; k < sheets.size(); k++)
        {
            String sheetname = workbook.getSheetName(k);

            if (sheetname.equals(name)) // here is the problem
            {
                retval = (HSSFSheet) sheets.get(k);
            }
        }
        return retval;
    }
"

MS Excel or OpenOffice are non case sensitive for sheetName : equalsignorecase
should be used instead of equals.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44892] [patch] HSSFWorkbook.getSheet(String name) should be case insensitive

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44892


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|HSSFWorkbook.getSheet(String|[patch]
                   |name) is case sensitive, but|HSSFWorkbook.getSheet(String
                   |it should not be            |name) should be case
                   |                            |insensitive




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44892] HSSFWorkbook.getSheet(String name) is case sensitive, but it should not be

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44892





--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-04-28 13:36:38 PST ---
Created an attachment (id=21875)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21875)
svn diff of 5 changed files

Seems like a similar change is required in
Workbook.doesContainsSheetName(String, int).  Updated javadocs and added one
junit.

Saved patch as an attachment because svn is not taking commits right now.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44892] [patch] HSSFWorkbook.getSheet(String name) should be case insensitive

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44892


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Josh Micich <jo...@gildedtree.com>  2008-04-30 20:24:49 PST ---
(In reply to comment #1)
> Created an attachment (id=21875)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21875) [details]

Applied in svn r652426


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org