CTWorkbook ctWorkbook = wb.getCTWorkbook();
assertFalse(ctWorkbook.isSetCalcPr());
wb.setForceFormulaRecalculation(true); // resets the EngineId flag to zero
CTCalcPr calcPr = ctWorkbook.getCalcPr();
assertNotNull(calcPr);
assertEquals(0, (int) calcPr.getCalcId());
calcPr.setCalcId(100);
assertTrue(wb.getForceFormulaRecalculation());
wb.setForceFormulaRecalculation(true); // resets the EngineId flag to zero
assertEquals(0, (int) calcPr.getCalcId());
assertFalse(wb.getForceFormulaRecalculation());
// calcMode="manual" is unset when forceFormulaRecalculation=true
calcPr.setCalcMode(STCalcMode.MANUAL);
wb.setForceFormulaRecalculation(true);
assertEquals(STCalcMode.AUTO, calcPr.getCalcMode());
}