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程序通过流控制来执行程序流,程序中单个顺序的流控制称为线程。
线程和进程的异同点在哪里?
相同点:他们一样拥有独立的执行控制,由操作系统负责调度。
不同点:线程没有独立的系统资源,同一进程中的所有线程共享进程的系统资源,如存储空间、磁盘文件、打印机等。
由于各个线程的控制流彼此独 ......
XML现在已经成为一种通用的数据交换格式,平台的无关性使得很多场合都需要用到XML。本文将详细介绍用Java解析XML的四种方法。
XML现在已经成为一种通用的数据交换格式,它的平台无关性,语言无关性,系统无关性,给数据集成与交互带来了极大的方便。对于XML本身的语法知识与技术细节,需要阅读相关的技术文献,这里面包括的内容 ......
在Java中有23中设计模式,下面只对部分常用的设计模式介绍一下:
1.单例模式(有的书上说叫单态模式其实都一样)
该模式主要目的是使内存中保持1个对象。看下面的例子:
package org.sp.singleton;
//方法一
public class Singleton {
//将自身的实例对象设置为一个属性,并加上Static和final修饰符
private static f ......
Java的跨平台是通过Java虚拟机(JVM)来实现的。
Java源文件的编译过程
Java应用程序的开发周期包括编译、下载、解释和执行几个部分。Java编译程序将Java源程序翻译为JVM可执行代码—字节码。这一编译过 ......