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

            Bug ID: 69688
           Summary: Exception regarding formulas thrown when using HSSFRow
                    copyRowFrom method even though data has no formulas
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: dsti...@gmail.com
  Target Milestone: ---

Created attachment 40040
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=40040&action=edit
Unit test demonstrating exception thrown when using HSSFRow copyRowFrom method

I am trying to use the HSSFRow copyRows method and I am hitting some
exceptions regarding formulas even though my data has no formulas. I took a
unit test of mine in which I was testing the bug I reported in
https://bz.apache.org/bugzilla/show_bug.cgi?id=69583 and refitted it with
an HSSFWorkbook along with my code which creates a new Workbook from each
Sheet of an existing Workbook. The unit code test is included as an
attachment. The stacktrace I get is:

[main] WARN org.apache.poi.POIDocument - DocumentSummaryInformation
property set came back as null
[main] WARN org.apache.poi.POIDocument - SummaryInformation property set
came back as null

java.lang.IllegalStateException: Cannot get a FORMULA value from a STRING
formula cell

at org.apache.poi.hssf.usermodel.HSSFCell.typeMismatch(HSSFCell.java:648)
at org.apache.poi.hssf.usermodel.HSSFCell.getCellFormula(HSSFCell.java:640)
at
org.apache.poi.hssf.usermodel.helpers.HSSFRowColShifter.updateRowFormulas(HSSFRowColShifter.java:74)
at
org.apache.poi.hssf.usermodel.helpers.HSSFRowShifter.updateRowFormulas(HSSFRowShifter.java:71)
at org.apache.poi.hssf.usermodel.HSSFRow.copyRowFrom(HSSFRow.java:853)
at
org.apache.nifi.excel.TestHSSFRowCopyRowFrom.test(TestHSSFRowCopyRowFrom.java:74)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to