Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
Hello developer,

I am struggling to automate Open Office document using C# .Net. I have done some work regarding office automation using Microsoft interope libraries. But in case of Open Office I have found something like AODL libraries.

I have downloaded it from the Apache web site and gave reference to my project of the AODL.dll file. Unfortunately I am not able to create any instance of new odt file.

There are examples given on AODL snippets[^] but still i am not getting any even document object properly.

TextDocument document = new TextDocument(); here I am missing TextDocument class even after referring AODL lib. I guess I am actually missing some OOPS tricks to invoke all object.

Please suggest any place on the net where I can find total implementation of AODL. Any small but complete snippet along with its implementation will do for me.
Posted
Updated 31-Oct-13 20:58pm
v2

1 solution

Hi comred,
here http://wiki.openoffice.org/wiki/AODL_example_17[^] example NUnit test will show how to create a new OpenDocument text document by using AODL and send it to a printer by using the new OpenOfficeLib.

Here http://aodl.sourceforge.net/about.html[^] is another example of AODL
The aim of the library is that a developer can build his Open Documents in an objectoriented way. The library uses the Mapper pattern to hide the xml handling for the user. Up to know some parts of the library already exists. See the following example.

I hope this will help you
Good luck comred!

Alex
 
Share this answer
 
Comments
comred 1-Nov-13 6:37am    
Thanks Alex. I was working on it, I have referred OpenOfficeLib.dll. But still I can't use it in my project. What I mean to say, "using OpenOfficeLib" this statement giving me error, as OpenOfficeLib not found, though it is there in my project directories.
Would you tell me please from where I can download this dll.
Volynsky Alex 1-Nov-13 7:06am    
Let's read the following posts:
http://www.removespywaretips.com/dll-o/openofficelib-dll.html
http://pcsupport.about.com/od/findbyerrormessage/a/shell-dll-not-found-missing-error.htm
http://www.oooforum.org/forum/viewtopic.phtml?t=61329
http://aodl2.googlecode.com/svn-history/r2/trunk/AODL/Resources/ChangeLog.txt
comred 11-Nov-13 6:28am    
Somehow I am able to put data in existing textboxes in OpenOffice document. I have used bookmark concept. Now I got stuck while dealing with tables. API tells me how to add new table. But how to get object of preexisting table and how to edit the same; this is missing. It's becoming a bit pathetic to find correct object. :/
Volynsky Alex 11-Nov-13 14:38pm    
using AODL.Document.Content.Tables;
comred 15-Nov-13 7:01am    
Thanks Alex, Its almost done. I wonder if I can copy text from one odt to another textframe. I am not getting any method to copy and paste the data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900