Hello.
In my example i want to replace certain cell’s formula to it’s value. It works, when worsheet’s flag “Display Zeros” is true, but don’t works, when this flag is false.
public void removeFormulaTest() {
Workbook wb = new Workbook();
Worksheet ws = wb.getWorksheets().get(0);
ws.setDisplayZeros(false);
Cell cell = ws.getCells().get(1, 1);
ws.getCells().get(0,0).setValue(0);
cell.setFormula("=A1+A2");
wb.calculateFormula();
assertEquals(0.0, cell.getValue());
String value = cell.getStringValue();
assertEquals(“0”, value);
cell.putValue(value, true);
}
I expected, that getStringValue() returns zeros too (getDisplayStringValue() should not).
Can you please help me with this issue? May be there is exists some way to replace formula by it’s value?
Best regards. Alexey