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 27673] New: - RowRecord.getLastCol() returns correct value+1
Date Mon, 15 Mar 2004 16:31:04 GMT
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=27673>.
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=27673

RowRecord.getLastCol() returns correct value+1

           Summary: RowRecord.getLastCol() returns correct value+1
           Product: POI
           Version: 2.0FINAL
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: dbigwood@metatomix.com
                CC: dbigwood@metatomix.com


Problem with the event driven XLS reader in HSSF. I believe the value returned 
by the RowRecord object for the last column used (indexed on 0) is incorrect. 
The value actually returned is the correct value + 1.

Snippet of code below (basically the simple event example in the docs):

public void processRecord(Record record) {
  switch (record.getSid()) {
    case RowRecord.sid :
      RowRecord rowrec = (RowRecord) record;
      System.out.println("Row number ["
        + rowrec.getRowNumber()
        + "], first col ["
        + rowrec.getFirstCol()
        + "] last col ["
        + rowrec.getLastCol()
        + "]");
  }
}

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


Mime
View raw message