Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

Office Python Scripts Help

Office provides an Application Programming Interface (API) that allows controlling the Office components with different programming languages by using the Office Software Development Kit (SDK). For more information about the Office API and the Software Development Kit, visit https://api.libreoffice.org

This help section explains the most common Python script functions for Office. For more in-depth information please refer to the Designing & Developing Python Applications on the Wiki.

Working with Python Scripts in Office

You can execute Python scripts choosing Tools - Macros - Run Macro. Editing scripts can be done with your preferred text editor. Python scripts are present in various locations detailed hereafter. You can refer to Programming examples for macros illustrating how to run the Python interactive console from Office.

The Office scripting framework for Python is optional on some GNU/Linux distributions. If it is installed, selecting Tools - Macros - Run Macro and checking Application Macros for the presence of HelloWorld – HelloWorldPython macro is sufficient. If absent, please refer to your distribution documentation in order to install the Office scripting framework for Python.

Assigning Scripts in Office

Setting up an Integrated Development Environment (IDE) for Python

Python Scripts Organisation and Location

Running Python Interactive Console

Programming with Python Scripts

Python programming examples

Creating Python Scripts with ScriptForge

Help about the Help

The Help references the default settings of the program on a system that is set to defaults. Descriptions of colours, mouse actions, or other configurable items can be different for your program and system.

The Office Help

The Help Index

Bookmarking Help pages

Contents - The Main Help Topics

Getting Support