发布于 2014-08-07 10:54:36 | 355 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Apache POI 开放源码函式库

Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程序对Microsoft Office格式档案读和写的功能。


Apache POI 团队今天发布了 POI 3.11 的第一个 beta 版,该版本新增了一些新功能,同时修复了大量的 bug,且支持的JDK版本升级到了1.6。

主要改进如下:

 

XSSF support for evaluating formula references to other Workbooks (56737)

HSSF and XSSF support for evaluating formulas with multi-sheet references,
 for functions that support that (55906)

HSSF and XSSF Workbooks are now CLoseable, so you can call close() to 
 explicitly free the file based resources when you're done (56537)

NPOIFS now fully supports writing, including streaming write, and in-place 
 updating of existing entries. NPOIFSFileSystem now surpasses the old 
 POIFSFileSystem in all cases. 

XSSF Text Extraction support for Headers, Footers and Comments (56022, 56023)

SXSSF Shared Strings optional support (53130)

XWPF Change Tracking support (56075)

HWPF password hash function (56077)

XWPF document protection with password support (56076)

SXSSF support for a system-wide setting of where Temp files get created, via
 TempFile / TempFileCreationStrategy (56735)

更多内容请看这里

Apache POI是一个开源的Java读写Excel、WORD等微软OLE2组件文档的项目。目前POI已经有了Ruby版本。

结构:

  • HSSF - 提供读写Microsoft Excel XLS格式档案的功能。

  • XSSF - 提供读写Microsoft Excel OOXML XLSX格式档案的功能。

  • HWPF - 提供读写Microsoft Word DOC格式档案的功能。

  • HSLF - 提供读写Microsoft PowerPoint格式档案的功能。

  • HDGF - 提供读Microsoft Visio格式档案的功能。

  • HPBF - 提供读Microsoft Publisher格式档案的功能。

  • HSMF - 提供读Microsoft Outlook格式档案的功能。

一段处理 EXCEL 文档的示例代码:

// Define a few rows
for(short rownum = (short)0; rownum < 30; rownum++) {
	HSSFRow r = s.createRow(rownum);
	for(short cellnum = (short)0; cellnum < 10; cellnum += 2) {
		HSSFCell c = r.createCell(cellnum);
		HSSFCell c2 = r.createCell(cellnum+1);

		c.setCellValue((double)rownum + (cellnum/10));
		c2.setCellValue(new HSSFRichTextString("Hello! " + cellnum);
	}
}

 



历史版本 :
Apache POI 3.17 发布,Office 文档的 Java API
Apache POI 3.16 发布,Office 文档的 Java 处理包
Apache POI 3.16 beta 2 发布,Office 文档的 Java 处理包
Apache POI 3.16 beta 1 发布
Apache POI 3.15,Office 文档的 Java 处理包
Apache POI 3.15-beta2 发布
Apache POI 3.15-beta1 发布,Java 的 Office 文档操作库
Apache POI 3.14 发布
Apache POI 3.14-beta1 发布
EasyPoi 2.1.5 发布,Excel 和 Word 简易工具类
Apache POI 3.13 版发布
Apache POI 3.13-beta1 发布
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务