aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-06-06 09:30:30 +0000
committerPJ Fanning <fanningpj@apache.org>2020-06-06 09:30:30 +0000
commitb7930fc65cadb685a49ec79e45c101a16146cd3f (patch)
tree28590ad9d45c11b4ccd6b319846832ee28f3a587 /src/testcases/org/apache/poi
parent5a18307eb051603509c8b8147f4dfdf0e8fe56b2 (diff)
downloadpoi-b7930fc65cadb685a49ec79e45c101a16146cd3f.tar.gz
poi-b7930fc65cadb685a49ec79e45c101a16146cd3f.zip
[github-181] make Value function work with arrays. Thanks to Miłosz Rembisz. This closes #181
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi')
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
index d0529220d2..7d7650de25 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
@@ -2903,6 +2903,21 @@ public final class TestBugs extends BaseTestBugzillaIssues {
public void test63819() throws IOException {
simpleTest("63819.xls");
}
+
+ /**
+ * Test that VALUE behaves properly as array function and its result is handled by aggregate function
+ */
+ @Test
+ public void testValueAsArrayFunction() throws IOException {
+ try (final Workbook wb = openSampleWorkbook("TestValueAsArrayFunction.xls")) {
+ wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
+ Sheet sheet = wb.getSheetAt(0);
+ Row row = sheet.getRow(0);
+ Cell cell = row.getCell(0);
+ assertEquals(6.0, cell.getNumericCellValue(), 0.0);
+ }
+ }
+
// a simple test which rewrites the file once and evaluates its formulas
private void simpleTest(String fileName) throws IOException {
simpleTest(fileName, null);