Java操作MS Word和Excel文档
能通过Java来操作Word或者Excel的api,据我所知的有这些,都考察了一下,开源的除了Openoffice和officewriter对Word的表格有好的支持外,其他都很不专业,或者不支持。
jacob http://sourceforge.net/projects/jacob-project/
JACOB is a JAVA-COM Bridge that allows you to call COM Automation components from Java. It uses JNI to make native calls to the COM libraries. JACOB runs on x86 and x64 environments supporting 32 bit and 64 bit JVMs
docx4j http://dev.plutext.org/trac/docx4j
docx4j is our library for unzipping a docx "package", and parsing the WordprocessingML XML to create an in-memory representation in Java.
It is available under the Apache License (v2).
This library is used by the plutext collaboration server, and the docx4all editor.
The library is designed to round trip docx files with 100% fidelity, and supports all WordML.
jxl http://jexcelapi.sourceforge.net/
poi http://poi.apache.org/
Aspose.Words http://www.aspose.com/ 付费产品
Aspose.Words for Java, it runs on any OS where Java is installed.
It will output the document to DOC, DOCX or RTF if you need an MS Word output format. All are supported equally well.
Using this API you can create a document from scratch, literally from nodes and set their formatting properties. You can also use a DocumentBuilder which provides higher level methods such as create a table row, insert a field etc. Or you can copy/join/move portions between existing pre created document, say you want to assemble a contract, just grab and copy pieces from several documents and Aspose.Words will merge styles, list formatting etc properly in the resulting document.
You will be able to insert a TOC field using Aspose.Words, but as of today, the TOC field will require a field update when the document is opened in Microsoft Word. However, we are going to release full support for TOC fields early in 2010. E.g. it will build complete TOC as MS Word does it.
openoffice http://www.openoffice.org/
officewriter http://officewriter.sof
相关文档:
快速排序是对冒泡排序的一种改进。它的基本思想是:通过一躺排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一不部分的所有数据都要小,然后再按次方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列。
假设要排序的数组是A[1]&hellip ......
为了保证示例程序的运行,必须安装Java 2 sdk1.4.0 和Jakarta POI,Jakarta POI的Web站点是: http://jakarta.apache.org/poi/
示例1将演示如何利用Jakarta POI API 创建Excel 文档。
示例1程序如下:
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import
org.apache.poi.hssf.usermodel.HSSFSheet;
impo ......
又到了快复试的时候了。遥想去年此时,心情忐忑不安,复试机试差点挂掉。当时考的是,联想输入法,想想都恐怖。这段时间写算法,顺便把那个给写了。也算最后纪念一下我的考研。我爱新学校,我也爱我的同学和老师,我很珍惜这次进入研究生院的机会。也希望那些此时和我当时一样忐忑不安的考生可以实现梦想!!
import java. ......
java读取mp3文件 收藏
JMF实际上是Java的一个类包。JMF 2.1.1技术提供了先进的媒体处理能力,从而扩展了Java平台的功能。这些功能包括:媒体捕获、压缩、流转、回放,以及对各种主要媒体形式和编码的支持,如M-JPEG、H.263、MP3、RTP/RTSP (实时传送协议和实时流转协议)、Macromedias Flash、IBM的HotMedia和Beatniks的Ri ......
首先java接口和抽象类代表的就是抽象类型,就是我们需要提出抽象层的具体实现,如果要提高程序的复用率,可维护性,可扩展性,就必须面向接口和抽象编程,正确使用他们。 (1)抽象类可以提供实现方法,接口不能
这是抽象类的唯一优点,而且非常有用,例如,你定义一个接口,子类不需要他的所有方法,可是你没办法不去 ......