Bug 61148 - Formula evaluation on an SXSSFCell is not working
Summary: Formula evaluation on an SXSSFCell is not working
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: SXSSF (show other bugs)
Version: 3.16-FINAL
Hardware: PC All
: P2 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks: 60302
  Show dependency tree
 
Reported: 2017-06-02 14:20 UTC by Morten
Modified: 2017-09-19 19:21 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Morten 2017-06-02 14:20:03 UTC
When evaluation an SXSSFCell containing a formula, the value of the cell is always cleared. 
In the following code, I would expect the output to be 3.0, but it is 0.0. If I instead created the Workbook as an XSSFWorkbook, the code works as expected.

final Workbook wb = new SXSSFWorkbook();
final Cell cell = wb.createSheet().createRow(0).createCell(0);
cell.setCellFormula("1+2");
wb.getCreationHelper().createFormulaEvaluator().evaluateInCell(cell);
System.out.println(cell.toString());
wb.close();
Comment 1 Dominik Stadler 2017-09-19 12:42:36 UTC
FYI, I have a fix pending for this that is waiting for another fix to land. 

When this is done, we should check if it also solves bug 60302 by fixing the cached formula content.
Comment 2 Dominik Stadler 2017-09-19 12:50:04 UTC
*** Bug 61532 has been marked as a duplicate of this bug. ***
Comment 3 Dominik Stadler 2017-09-19 19:05:40 UTC
Fixed some related problem with SXSSF via r1808874 and the core issue reported here via r1808929, unfortunately a slight hack needed to be employed, see the fix for details. 

So this should be fixed now.
Comment 4 Dominik Stadler 2017-09-19 19:21:37 UTC
*** Bug 61532 has been marked as a duplicate of this bug. ***