如何让使用Apache POI 3.6 Excel工作簿中的数学运算符? [英] how to get the excel workbook mathematical operators using apache poi 3.6?

查看:237
本文介绍了如何让使用Apache POI 3.6 Excel工作簿中的数学运算符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序,我想所有的Excel工作簿支持使用运营商的Apache POI 3.6 ...

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

Saravanan.P

推荐答案

这是实现的所有功能应该可以找到的 org.apache.poi.ss.formula.functions 的包:
http://poi.apache.org/apidocs/org/apache/poi/ss/formula/functions/package-summary.html

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持有的全部功能的注册,这可能是最好的地方,看到他们都作为一个列表:
<一href=\"https://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java\" rel=\"nofollow\">https://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

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

既然你提到想知道那些只是Apache的POI 3.6,你需要检查源$ C ​​$ C为该版本,而不是中继!无论是下载源代码发布,也可以找到SVN

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

结果

另外,如果你能够升级到Apache POI的新版本了,最近的版本提供了一种方法来查询与实现的功能在运行时!

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!

您现在可以使用 FunctionEval.getSupportedFunctionNames()方法来获取这是在你的Apache POI的版本实现的功能列表。要获得该POI知道是否存在功能列表,但没有实施,就需要相关的<一个href=\"http://poi.apache.org/apidocs/org/apache/poi/ss/formula/eval/FunctionEval.html#getNotSupportedFunctionNames%28%29\"相对=nofollow> FunctionEval.getNotSupportedFunctionNames()方法。请注意,后者将不可能面面俱到,好像POI不知道函数的名称,它不能够告诉你它是不是!最后,分析工具库函数,有一组可用的方法匹配。这些都是<一个href=\"http://poi.apache.org/apidocs/org/apache/poi/ss/formula/atp/AnalysisToolPak.html#getSupportedFunctionNames%28%29\"相对=nofollow> AnalysisToolPak.getSupportedFunctionNames()和<一个href=\"http://poi.apache.org/apidocs/org/apache/poi/ss/formula/atp/AnalysisToolPak.html#getNotSupportedFunctionNames%28%29\"相对=nofollow> AnalysisToolPak.getNotSupportedFunctionNames()

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()

这篇关于如何让使用Apache POI 3.6 Excel工作簿中的数学运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆