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 2004/03/15 17:31:04 UTC

DO NOT REPLY [Bug 27673] New: - RowRecord.getLastCol() returns correct value+1

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