jexcelapi
google查一下
Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1); String stringa1 = a1.getContents();
String stringb2 = b2.getContents();
String stringc2 = c2.getContents(); // Do stuff with the strings etc
...
The demo programs CSV.java and XML.java use the convenience method getContents() in order to output the spreadsheet contents. However if it is required to access the cell's contents as the exact type ie. as a numerical value or as a date, then the retrieved Cell must be cast to the correct type and the appropriate methods called. The section of code below illustrates how JExcelApi may be used to retrieve a genuine java double and java.util.Date object from an Excel spreadsheet. For completeness the label is also cast to it's correct type, although in practice this makes no difference. The example also illustrates how to verify that cell is of the expected type - this can be useful when validating that the spreadsheet has cells in the correct place.
String stringa1 = null;
double numberb2 = 0;
Date datec2 = null; Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);
google查一下
Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1); String stringa1 = a1.getContents();
String stringb2 = b2.getContents();
String stringc2 = c2.getContents(); // Do stuff with the strings etc
...
The demo programs CSV.java and XML.java use the convenience method getContents() in order to output the spreadsheet contents. However if it is required to access the cell's contents as the exact type ie. as a numerical value or as a date, then the retrieved Cell must be cast to the correct type and the appropriate methods called. The section of code below illustrates how JExcelApi may be used to retrieve a genuine java double and java.util.Date object from an Excel spreadsheet. For completeness the label is also cast to it's correct type, although in practice this makes no difference. The example also illustrates how to verify that cell is of the expected type - this can be useful when validating that the spreadsheet has cells in the correct place.
String stringa1 = null;
double numberb2 = 0;
Date datec2 = null; Cell a1 = sheet.getCell(0,0);
Cell b2 = sheet.getCell(1,1);
Cell c2 = sheet.getCell(2,1);
解决方案 »
- java应用的集群方案
- 请问根据实践经验,哪家代理公司的彩信短信平台会比较稳定和性价比高
- 有关数据同步
- 在使用hibernate的SQL查询的时候,如果遇到查出来的列无法放入JavaBean怎么办?
- 好你个pageContext
- 关于Hibernate共享Session的问题,请大家看看我的代码,看看有什么问题?
- 为进IT业落泪
- 谁能解释一下邮件服务器是如何发送邮件的?
- 向Application中添加client时发生错误(使用sun j2ee1.4的deploytool)
- 新手求救
- J2EE技术讨论群:7658172 欢迎爱好者加入.请注明CSDN
- jdbc insert,delete access数据库的怪异问题
网上查到的都是这个链接,下载已经无法下载了
谁有下载到的,共享一下,不胜感谢啊