OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Example Java create, populate, save template-based document
Goto page Previous  1, 2
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  
Author Message
cash1981
Newbie
Newbie


Joined: 28 Nov 2008
Posts: 4

PostPosted: Fri Nov 28, 2008 4:43 am    Post subject: Reply with quote

Does the MyTemplateDoc.odt which you have in your code need to contain anything specific?

If so, maybe you can also post the MyTemplateDoc.odt here?
Back to top
View user's profile Send private message
cash1981
Newbie
Newbie


Joined: 28 Nov 2008
Posts: 4

PostPosted: Fri Nov 28, 2008 4:56 am    Post subject: Reply with quote

I get this error when I try to run the program.
I have created the odt file, and pointed the file in main.

Code:

java.lang.Exception: com.sun.star.comp.helper.BootstrapException: no office executable found!
   at test.odf.WriterDoc.createDoc(WriterDoc.java:125)
   at test.odf.WriterDoc.main(WriterDoc.java:666)

Back to top
View user's profile Send private message
manicaesar
Newbie
Newbie


Joined: 14 Dec 2008
Posts: 1
Location: Poland

PostPosted: Sun Dec 14, 2008 1:38 pm    Post subject: Where to find imports Reply with quote

kvelentz wrote:
import com.sun.star.xml.dom.XDocument;
unoil.jar in the subfolder program/classes of your OOo installation directory.


Yes, but also you have to add juh.jar (com.sun.star.helper package) and ridl.jar (many packages) if you want ALL imports from this code to work. (These jars can also be found in subfolder mentioned above)

Have anybody an idea where to find these jars in OpenOffice 3.0 ?
-- self response: subfolder Basis/program/classes Wink
Back to top
View user's profile Send private message
chek
Newbie
Newbie


Joined: 08 Mar 2010
Posts: 1

PostPosted: Mon Mar 08, 2010 10:15 am    Post subject: repeating the text template Reply with quote

hi guys

I'm new in OOoForum.org and in OO developpment

your example has inspired mer to developpe an application that creates word document based on template docs.

my problem is that I want to repeat the template text as many times as the number of records returned from a database query

so can you help me please
Back to top
View user's profile Send private message
KeesVanElst
General User
General User


Joined: 19 Apr 2010
Posts: 14
Location: Netherlands

PostPosted: Fri Jul 09, 2010 2:41 am    Post subject: Reply with quote

Now this is stuff that's getting me in the right direction Very Happy
Hopefully it will be possible to compile a beginners tutorial with examples like these because OOo's Development learning curve is pretty steep.
I'd like to contribute to something like that in the near future but I'm still struggling with interface interception in remote context.
Cheers Rob
Back to top
View user's profile Send private message
Parikshit
Newbie
Newbie


Joined: 16 Jul 2010
Posts: 1

PostPosted: Sun Jul 18, 2010 9:52 pm    Post subject: Reply with quote

when i m trying to save generated document with

public void saveDoc(
XDocument document,
String saveFile,
DocumentFormatEnum format,
boolean overwrite) throws java.lang.Exception

method

it gives me errors



java.lang.NullPointerException
at com.cc.common.util.WriterDoc.saveDoc(WriterDoc.java:529)
at com.cc.common.util.WriterDoc.main(WriterDoc.java:681)


at this code

storable.storeAsURL(saveFileURL, properties);


please if anyone help me is appreciable.
Back to top
View user's profile Send private message
araLDAM
General User
General User


Joined: 28 Sep 2010
Posts: 5
Location: Sri Lanka

PostPosted: Mon Dec 06, 2010 10:31 pm    Post subject: New Chart Type Reply with quote

Hello robg..
First i want to Thank you in advance for the example of creating a chart in writer document.

Now i am going to create a new chart style which is not available in Open Office called surface charts. I have done some initial works regarding the source data extraction from a calc document. So can you give some guidance about a generic way of creating a new chart style.

I use java for implementations.
_________________
***ara
Back to top
View user's profile Send private message
disslexik
Newbie
Newbie


Joined: 20 Aug 2011
Posts: 2

PostPosted: Wed Aug 24, 2011 2:20 pm    Post subject: basic version Reply with quote

Hi Danny,

Great post - very useful. Do you know if there is something similar written in basic anywhere?

Best,

Neil.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group