The APSO add-on helps run and organize the code. Linux integration is better in that the system wide python can load the UNO libraries, sometimes requiring a package to be installed first depending on your distro.Ī tutorial is at. A disadvantage of this is that you may not be able to install other python packages you might want, for example lxml. This is faster because python runs inside the same process as the application rather than needing to interact through a socket.Įither way, on Windows, use the python distribution that ships with LO, as that includes glue code to make it possible to import uno. Macros can also be run from events such as opening a document, or button or key presses. In the window that open, expand My Macros, select Standard, and click New. Go to Tools Macros Organize Macros Basic. The other way is to open LO Calc normally and then run python macros from inside, for example by going to Tools -> Macros -> Run Macro. First, you have to create a new macro that reloads the content of the sheet by following these steps: Open LibreOffice Calc. The listening LO instance will be slower both for the GUI thread and for running the API commands from python. Then open a python prompt and enter import uno. To do this, start LibreOffice Calc listening on a socket. The first is easier to set up although slower.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |