add xmatch test

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-12-06 12:02:24 +00:00
parent 399280c79e
commit e52e874d28
1 changed files with 10 additions and 0 deletions

View File

@ -72,6 +72,16 @@ public class TestXMatchFunction {
}
}
@Test
void testMicrosoftExample4() throws IOException {
try (HSSFWorkbook wb = new HSSFWorkbook()) {
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb);
HSSFCell cell = wb.createSheet().createRow(0).createCell(0);
assertDouble(fe, cell, "XMATCH(4,{5,4,3,2,1})", 2);
assertDouble(fe, cell, "XMATCH(4.5,{5,4,3,2,1},1)", 1);
}
}
private HSSFWorkbook initNumWorkbook(String lookup) {
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet();