Hello. We have found some error in calculations chains, but i unable to explain some reasons for this. I have prepared test, that repeated our case:
public void calculationChainTest() {
try {
Workbook wb = new Workbook(“D:\test.xlsx”);
Cells cells = wb.getWorksheets().get(0).getCells();
wb.calculateFormula(true, new Resolver());
assertEquals(“resolve”, cells.get(“J18”).getDisplayStringValue());
} catch (Exception e) {
e.printStackTrace();
assertNull(e);
}
}
public class Resolver implements ICustomFunction {
@Override
public Object calculateCustomFunction(String s, ArrayList arrayList, ArrayList arrayList2) {
if (“usparentcell”.equals(s)){
return 4;
} else if (“ussqlfield”.equals(s)) {
return 4;
}
return null;
}
}
Can you please explain - what wrong in our temaplate or explain why i can’t receive a “resolve” in my chain.
Best regards. Alexey