https://bz.apache.org/bugzilla/show_bug.cgi?id=64508

            Bug ID: 64508
           Summary: java.lang.NumberFormatException: For input string: ""
           Product: POI
           Version: 4.1.2-FINAL
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

I'm using POI 4.1.2 on Ubuntu 20.04. The same problem occurs on POI 3.10.1,
3.17. These are the three version I tried.
When I try to run the attached program I get:
java.lang.NumberFormatException: For input string: ""
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:592)
        at java.lang.Integer.parseInt(Integer.java:615)
        at
org.apache.poi.xssf.usermodel.XSSFCell.getRichStringCellValue(XSSFCell.java:377)
        at
org.apache.poi.xssf.usermodel.XSSFCell.getStringCellValue(XSSFCell.java:342)
        at com.kovi.poitest.Test.main(Test.java:26)

What I could see is that the problem occurs in
org.apache.poi.xssf.usermodel.getRichStringCellValue() where _cell.isSetV()
returns true, but in fact should be false. I think this is wrong because
isSetV() only checks if the element v is present. In example Excel file E2 is:
<c r="E2" s="4" t="s"><v/>
</c>
so there is a v element, but it is empty.
Test project is Maven based and you can run it from build folder: java -cp
"poitest-1.0.0.jar:lib/*" com.kovi.poitest.Test TEST.xlsx

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to