diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index bc678d2c8d..f5ac4e18b6 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -2485,6 +2485,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su /** * Whether a call to {@link XSSFCell#setCellFormula(String)} will validate the formula or not. + * When enabled (which is the default), this option can lead to formulas being modified by POI formula renderer. * * @param value true if the application will validate the formula is correct * @since 3.17 @@ -2495,6 +2496,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su /** * Whether a call to {@link XSSFCell#setCellFormula(String)} will validate the formula or not. + * When enabled (which is the default), this option can lead to formulas being modified by POI formula renderer. * * @since 3.17 */ diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java b/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java index a4130d51e6..63c358e40c 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/Cell.java @@ -232,10 +232,14 @@ public interface Cell { * *
If the cell was blank, sets value to 0. Otherwise, preserves the value as precalculated.
* + * In XSSF implementation, there is aXSSFWorkbook.setCellFormulaValidation(boolean)
+ * setting that can validate (but also in some cases, reformat) the formula.
+ *
* @param formula the formula to set, e.g. "SUM(C4:E4)"
.
* If the argument is null
then the current formula is removed.
*
* @see Cell#removeFormula
+ * @see Workbook#setForceFormulaRecalculation(boolean)
* @throws IllegalStateException if this cell is a part of an array formula group containing other cells
* @throws FormulaParseException if the formula has incorrect syntax or is otherwise invalid
*/