https://issues.apache.org/bugzilla/show_bug.cgi?id=50587
--- Comment #5 from Yegor Kozlov <[email protected]> 2011-01-18 10:18:40 EST --- I made some tweaks, please review the updated patch. Summary of my changes: (1) added ASF licence header to CalculateMortgage.java and UserDefinedFunctionExample.java. This is a must in Apache projects. (2) repackaged CalculateMortgage.java and UserDefinedFunctionExample.java from poi.tests to org.apache.poi.ss.examples.formula (3) removed @Override from implemented interfaces, this is a JDK-1.6 feature. POI's language level is JDK-1.5 and it supports @Override only in sub-classes, not in interface implementatations. (4) Removed explicit instantiation of HSSFFormulaEvaluator. POI can work with UDFs in terms of common Spreadsheet interfaces: UDFFinder udfToolpack = new DefaultUDFFinder( functionNames, functionImpls ) ; // register the user-defined function in the workbook workbook.addToolPack(udfToolpack); FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator(); The code above transparently works with HSSF and XSSF. Other than that, very cool! Thanks for the excellent patch. The compiled documentation is available here: http://people.apache.org/~yegor/50587/site/spreadsheet/user-defined-functions.html If there are no questions / objections, I will apply it later this week. Regards, Yegor -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
