Bug 64768 - Formula isn't removed when cell value is updated
Summary: Formula isn't removed when cell value is updated
Status: RESOLVED DUPLICATE of bug 63845
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 4.1.2-FINAL
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-25 16:50 UTC by Vlad
Modified: 2020-10-25 20:57 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad 2020-09-25 16:50:45 UTC
I have a formula in the cell, for example:
=10 + 1

But when I set a new cell value like:

cell.setCellValue("foo")

POI doesn't remove the formula from the cell and cell type is still CellType.FORMULA. When I open the file in the Excel, cell value hasn't been changed.

Previosly I used Cell#setCellType(CellType) before updating cell value and it was working. But now, Cell#setCellType(CellType) is deprecated and I don't get the desired result by just using Cell#setCellValue(...).

Is it a bug? If so, could you fix it?
Comment 1 Dominik Stadler 2020-10-25 20:57:40 UTC
This is likely the same as bug #63845, please try with a recent nightly build and reopen this bug with more information if the problem still happens with that version.

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