views:

2092

answers:

3

On the web page, it looks like there is no current development in the old style .doc.

  • Is it good enough to create complex documents?
  • Can it read all .docs without crashing?
  • What features do (not) work?

I am not currently interested in the XML based formats, as I don't control the client side.

The excel support seems to be much better.

A: 

I have used the Apache POI For reading and writing Excel files (.xls) and it works like a charm. There were a few issues but I found easy workarounds so I assume it would be the same for the word documents. The only issue you would have is with reading and writing the .docx (.xlsx in my case) format since Apache POI does not support them yet.

andHapp
A: 

It dependes by your goal. I code with POI for report in Excel format and it's ok for simple report, because there'a a lot of code for simple operation. I coded some utility methods for repeating task. If you code for java =>1.5 you try JXLS (what extends POI and use XML/XSLT technologies).

alepuzio
+2  A: 

If you are looking for programmatically reading or writing doc files, I believe you're better of with remoting OpenOffice or StarOffice. We've done this at a former company, even though it's a pretty heavy solution, it worked quite well. OpenOffice has (right after Word) a very good doc-Support. For remoting it's a lot better than Word itself. At said company we (earlier) used to remotecontrol Word with frequent problems because Word (on saving a document) insisted on displaying a warning dialog from time to time. Bad idea on a server deep down in some datacenter with nobody close to it.

As this was a Java shop, the very good OpenOffice support for Java came in handy. In fact, they even used to bundle the commercial version StarOffice and had some very good contacts at and help from Sun.

Disclaimer: As andHapp and alepuzio said, POI is very good in Excel support and I'm using it with big success. Last time I've seen the doc support, I didn't dare using it in production (for customers). I haven't looked at doc support for at least two years.

Olaf