how to get the excel workbook mathematical operators using apache poi 3.6?

早过忘川 提交于 2019-12-13 07:14:26

问题


In my application, i want to get all the operators that Excel WorkBook supports using apache poi 3.6...

Please guide me to get this issue properly?

Saravanan.P


回答1:


All the functions that are implemented should be found in the org.apache.poi.ss.formula.functions package: http://poi.apache.org/apidocs/org/apache/poi/ss/formula/functions/package-summary.html

FunctionEval holds the registration of all the functions, which may be the best place to see them all as a list: https://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Since you mention wanting to know those for just Apache POI 3.6, you'll need to check the source code for that version, not trunk! Either download the source release, or you can find the source in SVN


Alternately, if you're able to upgrade to a newer copy of Apache POI, more recent versions provide a way to query the functions with implementations at runtime!

You can now use the FunctionEval.getSupportedFunctionNames() method to get a list of the functions which are implemented in your version of Apache POI. To get a list of functions that POI knows the existence of, but has no implementation for, you need the related FunctionEval.getNotSupportedFunctionNames() method. Note that the latter won't be exhaustive, as if POI doesn't know the name of a function it won't be able to tell you what it isn't! Finally, for the Analysis ToolPak function, there's a matching set of methods available. Those are AnalysisToolPak.getSupportedFunctionNames() and AnalysisToolPak.getNotSupportedFunctionNames()



来源:https://stackoverflow.com/questions/4332569/how-to-get-the-excel-workbook-mathematical-operators-using-apache-poi-3-6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!