Ceci est une ancienne révision du document !
Table des matières
Les macros avec LibreOffice
Version LibreOffice : 6.4.1 OS: Ubuntu 23.10
Avec LibreOffice Calc, il est possible d'éxécuter des macros, un ensemble de fonctions qui permet de manipuler et d'effectuer des opérations dans un ou plusieurs fichiers LibreOffice.
Les langages de programmation disponibles sont le BASIC, Python, JavaScript et BeanShell. Par defaut, seul BASIC est disponible.
Python
Pour utiliser Python pour programmer des macros, il faut installer le script:
sudo apt install libreoffice-script-provider-python
Sources et resources
https://api.libreoffice.org/ https://extensions.libreoffice.org/en/extensions/show/apso-alternative-script-organizer-for-python https://www.debugpoint.com/first-python-macro-libreoffice/ https://wiki.documentfoundation.org/images/4/44/CG6212FR-Macros.pdf https://wiki.documentfoundation.org/Macros/Python_Design_Guide https://wiki.documentfoundation.org/Macros/Python_Guide/My_first_macro https://help.libreoffice.org/latest/fr/text/sbasic/python/python_programming.html https://help.libreoffice.org/latest/fr/text/sbasic/python/python_ide.html https://help.libreoffice.org/latest/fr/text/sbasic/python/python_locations.html https://extensions.libreoffice.org/en/extensions/show/41700 https://python-ooo-dev-tools.readthedocs.io/en/main/index.html https://www.youtube.com/watch?v=pHlLdyJz2sE https://www.youtube.com/watch?v=d5Mga1TibJc