summaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-02-21 10:25:02 +0000
committerPJ Fanning <fanningpj@apache.org>2022-02-21 10:25:02 +0000
commitc5944488b23a816d5b2d23a815c7bdc05bf9b881 (patch)
tree30ea75719becc2eb1aeecfa56f5c44da004cd06b /poi
parent8a497a7db9ee1024ff23d0fdfe8e5c5677029132 (diff)
downloadpoi-c5944488b23a816d5b2d23a815c7bdc05bf9b881.tar.gz
poi-c5944488b23a816d5b2d23a815c7bdc05bf9b881.zip
add disabled test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1898269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumproduct.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumproduct.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumproduct.java
index 00133bc323..18db6cdbec 100644
--- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumproduct.java
+++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestSumproduct.java
@@ -32,6 +32,7 @@ import org.apache.poi.ss.formula.eval.NumberEval;
import org.apache.poi.ss.formula.eval.NumericValueEval;
import org.apache.poi.ss.formula.eval.RefEval;
import org.apache.poi.ss.formula.eval.ValueEval;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
@@ -135,6 +136,17 @@ final class TestSumproduct {
}
}
+ @Disabled("https://bz.apache.org/bugzilla/show_bug.cgi?id=65907")
+ @Test
+ void testMicrosoftExample3() throws Exception {
+ //https://support.microsoft.com/en-us/office/sumproduct-function-16753e75-9f68-4874-94ac-4d2145a2fd2e
+ try (HSSFWorkbook wb = initWorkbook3()) {
+ HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
+ HSSFCell cell = wb.getSheetAt(0).getRow(11).createCell(3);
+ assertDouble(fe, cell, "SUMPRODUCT((B2:B9=B12)*(C2:C9=C12)*D2:D9)", 5249);
+ }
+ }
+
private HSSFWorkbook initWorkbook1() {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();
@@ -145,4 +157,22 @@ final class TestSumproduct {
addRow(sheet, 4, null, "Ginger", 3.62, 6);
return wb;
}
+
+ private HSSFWorkbook initWorkbook3() {
+ HSSFWorkbook wb = new HSSFWorkbook();
+ HSSFSheet sheet = wb.createSheet();
+ addRow(sheet, 0, null , "Region", "Item", "Sales");
+ addRow(sheet, 1, null, "North", "Apples", 2763);
+ addRow(sheet, 2, null, "South", "Pears", 9359);
+ addRow(sheet, 3, null, "East", "Cherries", 3830);
+ addRow(sheet, 4, null, "West", "Bananas", 8720);
+ addRow(sheet, 5, null, "North", "Pears", 1873);
+ addRow(sheet, 6, null, "South", "Apples", 4065);
+ addRow(sheet, 7, null, "East", "Cherries", 1419);
+ addRow(sheet, 8, null, "West", "Bananas", 7173);
+ addRow(sheet, 9);
+ addRow(sheet, 10, null , "Region", "Item", "Sales");
+ addRow(sheet, 11, null , "East", "Cherries");
+ return wb;
+ }
}