poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51416] New: getFirstRowNum() org.apache.poi.ss.usermodel.Sheet returns -1 next is 1
Date Wed, 22 Jun 2011 12:24:02 GMT

             Bug #: 51416
           Summary: getFirstRowNum() org.apache.poi.ss.usermodel.Sheet
                    returns -1 next is 1
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: jordan@ffm-one.com
    Classification: Unclassified


I have written a program that reads xlsx files.

Regarding your example HSSFReadWrite.java 

int rows = sheet.getPhysicalNumberOfRows();
for (int r = 0; r < rows; r++)

rows start with 0.

So I also start iterating rows from 0 on. But now I have a xlsx where the rows
do not start with 0 but with -1 (result of getFirstRowNum() is -1).
getRow(0) is null and getRow(1) is working as usual.

"-1 => <xml-fragment r="0" spans=""
"1 => <xml-fragment r="2" spans="1:36"

I tried this on Windows Vista and Windows Server 2008.

Volker Jordan

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

View raw message