views:

64

answers:

1

Hi all,

I'm trying to re-write a C# application of mine in Java. I've chosen Java because our target platform is now Linux, no longer Windows.

My C# application used Microsoft Office Interop to automate things like Word and Excel. It would simply open different documents and apply our formatting to them (adjust column width, remove italics, etc). Finally, it would save the documents as PDF.

Now that we are targeting Java and Linux, and knowing that OpenOffice can do all of these things, I figured it would be a smooth transition. OpenOffice is open source, so it must have a relatively nice automation interface, right?

I've been Google'ing and looking at docs all morning. I've downloaded the OpenOffice SDK. I've followed instructions involving installing MinGW and a Zip toolkit. I've tried NetBeans plugins and Eclipse configuration settings.

The funny thing is, I'm not even sure if I'm in the right direction. I've been reading about OpenOffice UDO interface, but that sounds more like in-OpenOffice Scripts, like VBA or something.

Does anyone know if there's simply some sort of import that allows me to use OpenOffice to open and manipulate documents, similar to Office's Interop libraries? If so, know of any recent examples or blog posts, etc?

Thanks in advance!

+2  A: 

Yes, the OpenOffice jar files themselves (from the app) are the SDK. The interface involves calling methods in them. It's not hard once you figure it out, but I agree, documentation for it is pretty weak. It was definitely written by people that know how to do it, and can use it as a reference, but aren't any good at explaining it to others. :-)

Brian Knoblauch