3

By "not depend on automation", I mean that it should not require a Microsoft Office installation to work; let alone interact with a live instance of a Microsoft Office component. One such library is Aspose.Total for Java. Are there any more out there?

Another solution I'm considering is to use OpenOffice.org. However, I'm not sure if I'm going to run into the same problems as with Microsoft Office as detailed here.

2
  • 1
    What do you want ? A library to read/write office documents ? Or a library to interact with a live instance of Office (like Office macros written in Java) ? Commented Jan 19, 2011 at 13:56
  • Edited question body to reiterate condition in question title. Commented Jan 19, 2011 at 13:59

4 Answers 4

3

For Office Documents: http://poi.apache.org/

I have not tried this myself, but Apache usually deliver good libraries

For just Excel: JExcel API for Java

I use this for one application, and it works quite well. May use a fair bit of RAM for larger documents.

Sign up to request clarification or add additional context in comments.

1 Comment

In my limited experience with Apache POI, it also appeared to use a lot of RAM for larger documents (specifically large Excel documents).
1

One designed specifically to with with the newer XML formats is docx4j: http://dev.plutext.org/trac/docx4j

Comments

0

There are two further answers for this question. Depending on your application.

  1. can borrow from the OpenOffice library code that deals with opening and saving MS Office files. (See: http://www.artofsolving.com/opensource/jodconverter or jOpenDocument )

  2. You might just use OpenOffice itself by scripting or automating that.

I faced this question a while back with a Ruby app and because I was in control of the source document, I got the originator to save things as HTML format and used Tidy to filter the junk. Another option it to find a tool to convert the Office files to RTF which is more generic.

Another to consider ...

You may find spreadsheets BIG unless you use OpenOffice or MS Office because you need to have a fancy shamancy virtual sparse matrix to do what they do well.

Comments

0

ODF Toolkit - http://odftoolkit.org

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.