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

How to copy from Calc to Writer using Python ?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
steve.pole
General User
General User


Joined: 10 Nov 2005
Posts: 6

PostPosted: Tue Mar 21, 2006 12:34 pm    Post subject: How to copy from Calc to Writer using Python ? Reply with quote

Hi all,

in my Python script, I would like to copy an entire spreadsheet table in calc and paste it as an OLE object into a writer document.

My first question: The only to achieve this is to use the clipboard, correct ?

As I understand, I can insert the spreadsheet data into the document as writer table, but then, I have to do all the formatting in the writer doc again that I've done before in the spreadsheet. That's something I would like to avoid.

I have found several examples that copy something within one calc doc here on the forum. I have also found DannyB's examples and helper functions in the 5057, 5058 & 6052 posts, but they seem an overkill for the purpose and before I try to understand what is done there (especially around the dispatcher thing), I would like to know if there isn't a simpler way.

I'm neither a Python nor UNO nor OO.org expert, but looking at the steps required when I do it manually (calc: mark, CTRL-C; writer: CTRL-V), I think this is a trivial task which should have a trivial solution.

Thanks for your time.

CU Z>
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 Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
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