Office文档的Java处理包 POI

码农软件 · 软件分类 · Excel开发包 · 2019-09-17 13:57:08

软件介绍

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

结构:

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

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

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

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

  • 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);
}
}

在线Javadoc:http://www.ostools.net/apidocs/apidoc?api=apache-POI

本文地址:https://www.codercto.com/soft/d/14796.html

High Performance Python

High Performance Python

Micha Gorelick、Ian Ozsvald / O'Reilly Media / 2014-9-10 / USD 39.99

If you're an experienced Python programmer, High Performance Python will guide you through the various routes of code optimization. You'll learn how to use smarter algorithms and leverage peripheral t......一起来看看 《High Performance Python》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具