use of org.apache.poi.ss.examples.formula.CalculateMortgageFunction in project poi by apache.
the class TestExcelAntWorkbookUtil method testGetEvaluatorXLSXWithFunction.
public void testGetEvaluatorXLSXWithFunction() {
fixture = new ExcelAntWorkbookUtilTestHelper(BuildFileTest.getDataDir() + "/spreadsheet/sample.xlsx");
fixture.addFunction("h2_ZFactor", new CalculateMortgageFunction());
FormulaEvaluator evaluator = fixture.getEvaluator(BuildFileTest.getDataDir() + "/spreadsheet/sample.xlsx");
assertNotNull(evaluator);
}
use of org.apache.poi.ss.examples.formula.CalculateMortgageFunction in project poi by apache.
the class TestExcelAntWorkbookUtil method testAddFunction.
public void testAddFunction() {
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
assertNotNull(fixture);
fixture.addFunction("h2_ZFactor", new CalculateMortgageFunction());
UDFFinder functions = fixture.getFunctions();
assertNotNull(functions);
assertNotNull(functions.findFunction("h2_ZFactor"));
}
use of org.apache.poi.ss.examples.formula.CalculateMortgageFunction in project poi by apache.
the class TestExcelAntWorkbookUtil method testGetEvaluatorWithUDF.
public void testGetEvaluatorWithUDF() {
fixture = new ExcelAntWorkbookUtilTestHelper(mortgageCalculatorFileName);
fixture.addFunction("h2_ZFactor", new CalculateMortgageFunction());
FormulaEvaluator evaluator = fixture.getEvaluator(mortgageCalculatorFileName);
assertNotNull(evaluator);
}
Aggregations