Python Libreoffice Base

Posted onby admin

LibreOffice Base libreoffice-base.png In case it's not obvious from its name, Base is part of the LibreOffice productivity suite, which includes Writer (word processing), Calc (spreadsheet), Impress (presentations), Draw (graphics), Charts (chart creation), and Math (formulas). Languages (Java, Python, C, LibreOffice 6.4 Basic, OLE) to illustrate the use of the API and demonstrate how to benefit from the included word processor, spreadsheet, presentation software, graphics program and database of LibreOffice 6.4. Some of the examples need a running office instance listening on a.

  • LibreOffice / ˈ l iː b r ə / is a free and open-source office productivity software suite, a project of The Document Foundation (TDF). It was forked in 2010 from, which was an open-sourced version of the earlier StarOffice.The LibreOffice suite consists of programs for word processing, creating and editing of spreadsheets, slideshows, diagrams and drawings, working with.
  • LibreOffice Basic libraries contain classes, routines and variables, Python modules contain classes, functions and variables. Common pieces of reusable Python or UNO features must be stored in My macros within (User Profile)/Scripts/python/pythonpath. Python libraries help organize modules in order to prevent module name collisions.

As you know the LibreOffice includes several applications that make it the most powerful Free and Open Source office suite on the market: Writer (word processing), Calc (spreadsheets), Impress (presentations), Draw (vector graphics and flowcharts), Base (databases), and Math (formula editing).
This tutorial is about LibreOffice and python scripts used like macros.
First, you need to assign the permission for your user to write into the script folder.
The main reason comes from your software – the LibreOffice and your script editor for python language need to using this path: C:Program Files (x86)LibreOffice 5shareScripts.
If you using one of the linux OS then he path will be: /Applications/
Your script can be run using the LibreOffice macro: Tools – Macros – Organize Macros – Python.
This allows you to see the python files and also can be run with the Run button.
I used LibreOffice version: to make one default python script.
I open my python script with the LibreOffice default interface ( not Writer, Calc, Base, etc.) and this allows me to run python scripts for any type of LibreOffice applications.
Let’s see the python script: