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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14269

PATCH  - CellReference exception

           Summary: PATCH  - CellReference exception
           Product: POI
           Version: 2.0-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HSSF
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


int nameNum = book.getNumberOfNames();
for (int i = 0; i < nameNum; i++) {
    HSSFName namedRef = book.getNameAt(i);
    System.out.println("Cell ref = " + namedRef.getReference());
    CellReference cellRef = new CellReference(namedRef.getReference());
}

results in: 

Cell ref = Summary!$D$31
java.lang.NumberFormatException: D$31   
  at java.lang.Integer.parseInt(Integer.java:426)       
  at java.lang.Integer.parseInt(Integer.java:476)       
  at
org.apache.poi.hssf.util.CellReference.<init>(CellReference.java:82)

because it doesn't seem to be parsing the string right (it doesn't pass
over the sheet name before trying to parse row/col information out.

Patch is attached.

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

Reply via email to