tutolibro.tech > Articles by: gweno
Author Archive: gweno
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
Using the code created in part 8, in this part 9 we are going to manipulate the data with functions getDataArray, setDataArray and Python Tuples. In this first example we are going to reverse the order of data within a…
Read more
This time we are going to create a new Range of Cells and fill it with the data stored in our tuple created in part 7. Here is the plan for this tutorial: Start with code from the previous chapter…
Read more
The topic for this episode of my LibreOffice Calc & Python Programming tutorial series is to get the data stored in a range of cells in LibreOffice. And we are going to do that using some very useful dedicated Pythons…
Read more
In this episode of my LibreOffice Calc & Python Programming tutorial series I am going to talk about the different types of data stored in a LibreOffice cell, and what type to use in the Python code to keep the…
Read more
This episode of my LibreOffice Calc & Python Programming tutorial is an annex to the normal series. In this article I am going to show you a quick way to execute your python scripts.The idea is simple: you assign a…
Read more
In this episode of my LibreOffice Calc & Python Programming tutorial series I am going to show how to display a text message in a pop-up window. To do that you need to import the module msgbox that will allow…
Read more
In this episode of my LibreOffice Calc & Python Programming tutorial series I am going to show a quick way to display text in order to watch some variables or to debug programs. Display text with the console Sometimes (actually…
Read more
This episode of my LibreOffice Calc & Python Programming tutorial is a bit special. It is not about coding python scripts for LibreOffice, yet it is to learn a really useful method to track the different versions of your programs.We…
Read more