aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/ss/usermodel
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2011-05-09 14:04:21 +0000
committerNick Burch <nick@apache.org>2011-05-09 14:04:21 +0000
commite94feeee12d4356cf5e46b44894032b64f6d0110 (patch)
tree54b43348d22e8048c721aeacc11fd282a9ce8f27 /src/java/org/apache/poi/ss/usermodel
parent888645dd3f8c50579d47dd9d7bb174b10c38cff8 (diff)
downloadpoi-e94feeee12d4356cf5e46b44894032b64f6d0110.tar.gz
poi-e94feeee12d4356cf5e46b44894032b64f6d0110.zip
As Java doesn't allow static methods on interfaces, allow HSSFFormulaEvaluator or XSSFFormulaEvaluator to generically recalculate all formulas in a workbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1101033 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ss/usermodel')
-rw-r--r--src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java b/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
index 3d1076fdf5..adbb685ffb 100644
--- a/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
+++ b/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
@@ -57,6 +57,16 @@ public interface FormulaEvaluator {
void notifyUpdateCell(Cell cell);
/**
+ * Loops over all cells in all sheets of the associated workbook.
+ * For cells that contain formulas, their formulas are evaluated,
+ * and the results are saved. These cells remain as formula cells.
+ * For cells that do not contain formulas, no changes are made.
+ * This is a helpful wrapper around looping over all cells, and
+ * calling evaluateFormulaCell on each one.
+ */
+ void evaluateAll();
+
+ /**
* If cell contains a formula, the formula is evaluated and returned,
* else the CellValue simply copies the appropriate cell value from
* the cell and also its cell type. This method should be preferred over