]> source.dussan.org Git - poi.git/commitdiff
bug 57721: add unit test for evaluating all formulas in a workbook containing structu...
authorJaven O'Neal <onealj@apache.org>
Fri, 10 Jun 2016 16:36:59 +0000 (16:36 +0000)
committerJaven O'Neal <onealj@apache.org>
Fri, 10 Jun 2016 16:36:59 +0000 (16:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747740 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java
test-data/spreadsheet/evaluate_formula_with_structured_table_references.xlsx [new file with mode: 0644]

index 42f93af4f6f4615780e6c7ca51464e2b81bbdf3d..a6d5bdb966ce13994034d036f908f51597ee75a7 100644 (file)
@@ -606,6 +606,16 @@ public final class TestXSSFFormulaEvaluation extends BaseTestFormulaEvaluator {
         wb.close();
     }
 
+    // bug 57721
+    @Test
+    public void structuredReferences() throws IOException {
+        XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("evaluate_formula_with_structured_table_references.xlsx");
+        
+        XSSFFormulaEvaluator.evaluateAllFormulaCells(wb);
+
+        wb.close();
+    }
+
     /**
     * @param row 0-based
     * @param column 0-based
diff --git a/test-data/spreadsheet/evaluate_formula_with_structured_table_references.xlsx b/test-data/spreadsheet/evaluate_formula_with_structured_table_references.xlsx
new file mode 100644 (file)
index 0000000..a4f9caa
Binary files /dev/null and b/test-data/spreadsheet/evaluate_formula_with_structured_table_references.xlsx differ