系统开发的需要,属性文件中是这样的一些值(从Excel中抽出来的)
A1=10
B1=20
C1=A1 + B1
(实际系统比这些公式复杂的多)
有没有Java的包,可以直接以Excel的方式分析出上面表格中的值,并具提供计算功能。也就是说,通过java可以知道A1中的值是10,B1中的值是20,C1中是一个计算公式A1 + B1,然后还可以得到C1的结果值(A1 + B1 是30,30为结果值),急!请高手指点。
A1=10
B1=20
C1=A1 + B1
(实际系统比这些公式复杂的多)
有没有Java的包,可以直接以Excel的方式分析出上面表格中的值,并具提供计算功能。也就是说,通过java可以知道A1中的值是10,B1中的值是20,C1中是一个计算公式A1 + B1,然后还可以得到C1的结果值(A1 + B1 是30,30为结果值),急!请高手指点。
解决方案 »
- web打印如何设置默认纸张?
- 只是想求一张表中的某一个字段的和而已,也不知道到底是哪里错了???
- 我在jsp页里有一个table表,我要选中其中的一条记录哪何实现,高手帮忙急用在线等!!!!!!!!!!!
- MVC设计
- 读取数据并使用
- 我写了一个程序,怎样才能把adsl拨号程序和它绑定起来?要求执行了这个程序之后马上进行adsl拨号
- 急,如何让文件直接安装不用下载
- 怎样能得到ResultSet返回的记录数目
- jsp中处理字符串的函数在哪里可以找到?
- 请问在java中,类型java.lang.Boolean和boolean类型有啥区别?
- struts工程form表单提交乱码问题 谢谢了用了 几种方法都不行啊
- 十万火急!!菜鸟问题!!
http://hi.baidu.com/zhufangtian/blog/item/98aa164cc5919df9d72afc95.html
//读取表格内容。
Cell c00 = st.getCell(0,0);
String strc00 = c00.getContents();
System.out.println(strc00);
看来是可以读出已知row和col的单元格的值,那么就可以完成计算功能(有没有公式不知道,但能读出来就可以计算)。
A1=10
B1=20
C1=A1 + B1
现在想找个Java包,可以识别出这里面的各种计算公式,并计算出结果。
继续等待中...
继续等待中...
The POI project consists of APIs for manipulating various file formats based upon Microsoft's OLE 2 Compound Document format using pure Java. In short, you can read and write MS Excel files using Java. Soon, you'll be able to read and write Word files using Java. POI is your Java Excel solution as well as your Java Word solution. However, we have a complete API for porting other OLE 2 Compound Document formats and welcome others to participate. OLE 2 Compound Document Format based files include most Microsoft Office files such as XLS and DOC as well as MFC serialization API based file formats. As a general policy we try to collaborate as much as possible with other projects to provide this functionality. Examples include: Cocoon for which there are serializers for HSSF; Open Office.org with whom we collaborate in documenting the XLS format; and Lucene for which we'll soon have file format interpretors. When practical, we donate components directly to those projects for POI-enabling them. ------------------------------------http://jakarta.apache.org/poi/
POI文档里说过POI支持公式,不过不知道能不能提取EXCEL中的公式,LZ可去看看