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 2017/09/18 15:28:44 UTC

[Bug 61532] New: XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

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

            Bug ID: 61532
           Summary: XSSFFormulaEvaluator.evaluateFormulaCell() replaces
                    the formula and changes the cell type
           Product: POI
           Version: 3.14-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: david.neuer.vendor@crowncastle.com
  Target Milestone: ---

XSSFFormulaEvaluator.evaluateFormulaCell(), at least when used with a formula
of type VLOOKUP in an SXSSFWorkbook, behaves the way the documentation says
that evaluateInCell() is supposed to work; it replaces the actual value of the
cell with the results of running the formula, and changes the cell type to
whatever the type of the result is. So, the two methods behave identically.

The correct behavior, according to the documentation, is to simply update the
result value cache.

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dave Neuer <da...@crowncastle.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |---
             Status|RESOLVED                    |REOPENED

--- Comment #5 from Dave Neuer <da...@crowncastle.com> ---
It works as documented for some functions, but not others.

I have a unit test which shows that it succeeds for SUM but fails for VLOOKUP.
I'll attach a maven POM and the test.

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Are you able to try with Apache POI 3.17, released last week, and see how that
behaves?

If the problem remains, would you be able to write a short junit unit test (or
failing that short standalone program) demonstrating the issue, so we can
reproduce it to take a look?

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

--- Comment #8 from Jason Goris <ja...@crowncastle.com> ---
Have there been any updates into this issue?

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

--- Comment #7 from Dave Neuer <da...@crowncastle.com> ---
Created attachment 35595
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35595&action=edit
Unit test demonstrating that POI 3.17 still has the bug

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---


*** This bug has been marked as a duplicate of bug 61148 ***

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dave Neuer <da...@crowncastle.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.14-FINAL                  |3.17-FINAL

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #9 from Dominik Stadler <do...@gmx.at> ---
Should be fixed via r1849880 now, in SXSSF applying rich text formula results
did change the cell type. 

Also the pre-evaluated value was not correctly written into the .xlsx file,
making reading the file in again fail.

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

--- Comment #6 from Dave Neuer <da...@crowncastle.com> ---
Created attachment 35594
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35594&action=edit
POM to bring down POI and jUNIT

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |---

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #4 from Dominik Stadler <do...@gmx.at> ---
I have now tested it as far as I can and added a unit-test via r1808932 which
shows that the two methods behave as documented and expected after fixing bug
61148. 

Please verify it with a build which contains these changes and reopen the bug
if it is still not fixed for you with some special combination of
formula/call-order.

*** This bug has been marked as a duplicate of bug 61148 ***

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

--- Comment #3 from Dave Neuer <da...@crowncastle.com> ---
I don't believe this is a duplicate of the linked issue; the description of
that issue is different, though they may share an underlying cause.

I'll work on a small test case demonstrating the issue in the coming days.

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


[Bug 61532] XSSFFormulaEvaluator.evaluateFormulaCell() replaces the formula and changes the cell type

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61532

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEEDINFO

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