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 2019/04/11 02:59:27 UTC

[Bug 63339] New: Setting cached formula result corrupts workbook

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

            Bug ID: 63339
           Summary: Setting cached formula result corrupts workbook
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: cowwoc2020@gmail.com
  Target Milestone: ---

Version 4.1.0

Bug #46885 is back. If one invokes setCellValue(String) on a cell of type
FORMULA, the new value will be ignored. One can workaround this issue by
explicitly changing the cell type prior to changing its value.

XSSFCell.setCellValueImpl() invokes _cell.setT(STCellType.STR) but
_cell.isSetF() remains true.

Expected behavior: _cell.isSetF() should return false after changing the cell
value from a FORMULA to String.

-- 
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


Re: [Bug 63339] New: Setting cached formula result corrupts workbook

Posted by Vladislav Galas <ga...@apache.org>.
Hello @devs

Here's the case I've been talking about. The Cell interface if designed so that it gives an impression that FORMULA is a "value" type, although IMHO it shouldn't be.
A cell is either BLANK, or a BOOLEAN/NUMERIC/STRING/ERROR, possibly with a FORMULA. 
Setting a cached value may be useful for copying cells and, even more important, for circular references which I intend to implement.

There may be a reasonable objection that Excel doesn't allow to enter a cached value for a formula (so why should POI?). However, in Excel stale formula results are possible: in manual recalculation mode, or in presence of external references, or when iterative evaluation is switched off.

Either we stick to the "formula is a value type",
or I update javadoc for setters to clarify that setting a value (except BLANK) does not affeect the formula.

Please comment.

On 2019/04/11 02:59:27, bugzilla@apache.org wrote: 
> https://bz.apache.org/bugzilla/show_bug.cgi?id=63339
> 
>             Bug ID: 63339
>            Summary: Setting cached formula result corrupts workbook
>            Product: POI
>            Version: unspecified
>           Hardware: PC
>             Status: NEW
>           Severity: regression
>           Priority: P2
>          Component: XSSF
>           Assignee: dev@poi.apache.org
>           Reporter: cowwoc2020@gmail.com
>   Target Milestone: ---
> 
> Version 4.1.0
> 
> Bug #46885 is back. If one invokes setCellValue(String) on a cell of type
> FORMULA, the new value will be ignored. One can workaround this issue by
> explicitly changing the cell type prior to changing its value.
> 
> XSSFCell.setCellValueImpl() invokes _cell.setT(STCellType.STR) but
> _cell.isSetF() remains true.
> 
> Expected behavior: _cell.isSetF() should return false after changing the cell
> value from a FORMULA to String.
> 
> -- 
> 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
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 63339] Setting cached formula result corrupts workbook

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

Gili <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
            Version|unspecified                 |4.0.x-dev

-- 
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 63339] Setting cached formula result corrupts workbook

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |63845

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
This is likely related to the regression discussed in bug 63845


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=63845
[Bug 63845] Forumla not evaluated in 4.1.0
-- 
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 63339] Setting cached formula result corrupts workbook

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63339
Bug 63339 depends on bug 63845, which changed state.

Bug 63845 Summary: Forumla not evaluated in 4.1.0
https://bz.apache.org/bugzilla/show_bug.cgi?id=63845

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

-- 
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 63339] Setting cached formula result corrupts workbook

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

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

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

--- Comment #2 from Dominik Stadler <do...@gmx.at> ---
As far as I could test this should be fixed via the changes for bug #63845
already, maybe you can verify a recent nightly build to verify from your end as
well.

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

-- 
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