如何使用apache poi 3.6获取excel工作簿数学运算符? [英] how to get the excel workbook mathematical operators using apache poi 3.6?

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

问题描述

在我的应用程序中,我想使用 apache poi 3.6 获取 Excel WorkBook 支持的所有运算符...

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?

沙拉湾.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 保存了所有函数的注册信息,这可能是将它们全部视为列表的最佳位置: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 的那些,你需要检查那个版本的源代码,而不是主干!要么下载源码发布,要么你可以在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 知道存在但没有实现的函数列表,您需要相关的 FunctionEval.getNotSupportedFunctionNames() 方法.请注意,后者不会是详尽无遗的,就好像 POI 不知道函数的名称一样,它无法告诉您它不是什么!最后,对于分析工具库函数,有一组匹配的可用方法.这些是 AnalysisToolPak.getSupportedFunctionNames()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天全站免登陆