From: Javen O'Neal Date: Fri, 10 Jun 2016 16:36:59 +0000 (+0000) Subject: bug 57721: add unit test for evaluating all formulas in a workbook containing structu... X-Git-Tag: REL_3_15_BETA2~175 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=962d0829f1fda57d94f141b92787f0bb1298463b;p=poi.git bug 57721: add unit test for evaluating all formulas in a workbook containing structured reference formulas; patch from gruber.chri@gmx.at git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747740 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java index 42f93af4f6..a6d5bdb966 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java @@ -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 index 0000000000..a4f9caad34 Binary files /dev/null and b/test-data/spreadsheet/evaluate_formula_with_structured_table_references.xlsx differ