DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43015>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43015

           Summary: HSSFRow.getLastCellNum() works incorrectly.
           Product: POI
           Version: 3.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Performs test:
1.
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet();
HSSFRow row = sheet.createRow((short) 0);
row.createCell((short) 0);
System.out.println("FIRST CELL NUM: " + row.getFirstCellNum()
    + "; " + " LAST CELL NUM: " + row.getLastCellNum());
Console results:
EXPECTED: FIRST CELL NUM: 0;  LAST CELL NUM: 1
OBSERVED: FIRST CELL NUM: 0;  LAST CELL NUM: 0

Java-doc says:
/**
     * gets the number of the last cell contained in this row <b>PLUS ONE</b>. 
     * @return short representing the last logical cell in the row <b>PLUS ONE</
b>, or -1 if the row does not contain any cells.
     */

    public short getLastCellNum()

If we performs this test for sheet that read from file all is ok.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to