tutolibro.org > Articles by: gweno
Author Archive: gweno
Assign the macro to a LibreOffice Control Button. When you write a macro within libreOffice, you will quickly realise something. It’s not really convenient to execute macros through the Macro Manager. This is because you need to access that menu,…
Read more
I am finally starting to write this tutorial. Thanks for your patience, and thanks to Nukool for your comment, it really gave me motivation to write this course. In this Part 1 of LibreOffice Calc & Python programming tutorial we…
Read more
This article helps you decide whether to embed your python macro in the file. It also explores saving it in a macro repository. With the APSO add-on (see previous article) you can embed your macro within the LibreOffice File. This…
Read more
First let’s get the coding done, then we’ll dive in to it. You can either copy this block of code above or better type it yourself. Typing the code yourself will take longer but it’s the best way to remember…
Read more
In this episode of my LibreOffice Calc & Python Programming tutorial, we are going to write our first Python Macro. It will write ‘Hello World’ in cell A1 of a LibreOffice Calc document. How exciting is that!?! Here is the…
Read more
Let’s start with the full code, then dive down First we need to import the uno library and the specific PropertyValue function Then let’s set the couple of service definitions that we need: We create 3 functions: create_instance: new_document_from_template: This…
Read more
Watch year 2025 edition of The World Famous ‘Runner Beans Race’.
Watch year 2024 edition of The World Famous ‘Runner Beans Race’.
Usually the first statement, when scripting with python to work on a LibreOffice document, would be:desktop = XSCRIPTCONTEXT.getDesktop() getDesktop() is a method of the object XSCRIPTCONTEXT and returns the Desktop Reference on which our script can interact with. This reference…
Read more
When you program a script within LibreOffice, accessing the XSCRIPTCONTEXT object is the starting point for controlling LibreOffice documents. SCRIPTCONTEXT is an object of class ‘pythonscript.ScriptContext’.This object provides connections with running instances of LibreOffice and has four useful methods:getDocument ()getInvocationContext…
Read more