Hi,
I am trying to learn Python Macros for Open Office, particularly for spreadsheets. I have found lots of bits, some reasonable stuff on Python as standalone, but nothing that tells me how to use it for macors. Can someone point me to a good tutorial and a list of functions.
Thanks
Mick
Python Macro Tutorial
-
- Posts: 3
- Joined: Fri Nov 28, 2008 10:38 pm
Python Macro Tutorial
OOo 2.4.X on Ubuntu 8.x
Re: Python Macro Tutorial
http://wiki.services.openoffice.org/wik ... ent_python
Page title is misleading. Extensions are only one aspect. Most of the linked stuff is about Python and OOo in general. The most difficult thing is the UNO-API which is independent from language. You need to understand how to express anything in Python while knowing the thing you are talking to (UNO). No matter what language you are going to use, UNO needs to "understand" what you want it to do.
The very first macro you need to call in Python is a Basic macro: http://www.oooforum.org/forum/viewtopic.phtml?t=69350
Get xray from OOoMacros.org
Page title is misleading. Extensions are only one aspect. Most of the linked stuff is about Python and OOo in general. The most difficult thing is the UNO-API which is independent from language. You need to understand how to express anything in Python while knowing the thing you are talking to (UNO). No matter what language you are going to use, UNO needs to "understand" what you want it to do.
The very first macro you need to call in Python is a Basic macro: http://www.oooforum.org/forum/viewtopic.phtml?t=69350
Get xray from OOoMacros.org
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 3
- Joined: Fri Nov 28, 2008 10:38 pm
Re: Python Macro Tutorial
Thanks for the reply.
OK I guess my questions split in 2 then.
1) Where can I find a tutorial for UNO
2) Where can I find a list of functions that I can call in Python, e.g. to return the value in current cell, move to a different cell, write a new value to a cell, etc. From what you have said I guess it does not matter what language is used, it calls a UNO function, is that correct?
Thanks
Mick
OK I guess my questions split in 2 then.
1) Where can I find a tutorial for UNO
2) Where can I find a list of functions that I can call in Python, e.g. to return the value in current cell, move to a different cell, write a new value to a cell, etc. From what you have said I guess it does not matter what language is used, it calls a UNO function, is that correct?
Thanks
Mick
OOo 2.4.X on Ubuntu 8.x
-
- Posts: 3
- Joined: Fri Nov 28, 2008 10:38 pm
Re: Python Macro Tutorial
Sorry, just noticed the link on the head of your post. Let me check that out.
Thanks for your help
Mick
Thanks for your help
Mick
OOo 2.4.X on Ubuntu 8.x
Re: Python Macro Tutorial
And I forgot to mention IMPORTANT: Workarounds for pyuno problems in OOo3.0.0micksulley wrote:Sorry, just noticed the link on the head of your post. Let me check that out.
Thanks for your help
Mick
In this site's forum for code snippets I published some simple (more or less) working macros. User DannyB on OOoForum.org was the pioneer indroducing pyuno to the "outside world" (whatever that is).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice