Libreoffice-WIP

From AutoIt Wiki
Revision as of 16:12, 17 February 2026 by Water (talk | contribs)
Jump to navigation Jump to search

This page is still a work in progress.

This article uses material from the Wikipedia article "LibreOffice" and other Wikipedia articles, which are released under the Creative Commons Attribution-Share-Alike License 4.0.

Introduction

This UDF (AU3LibreOffice) aids the user in creating and manipulating LibreOffice Documents.
This wiki article tries to explain basic principles of the UDF and offers tips on how to get started with automating LibreOffice (LO for brevity). It also points out some differences between automating the MS Office and LO suites.
It is not intended to explain LO's API.
To work with this UDF, you should be familiar with both AutoIt and LO.

What is LibreOffice?

LibreOffice is a free and open-source office productivity software suite developed by The Document Foundation (TDF).
It was created in 2010 as a fork of OpenOffice.org, itself a successor to StarOffice.
The suite includes applications for

  • word processing (Writer),
  • spreadsheets (Calc),
  • presentations (Impress),
  • vector graphics (Draw),
  • database management (Base), and
  • formula editing (Math).

It supports the OpenDocument format and is compatible with other major formats, including those used by Microsoft Office.
Generally speaking, OpenOffice and LibreOffice have the same foundational features, but given the fact that LibreOffice is more actively developed, LibreOffice has more, and newer features available.

Feature comparison: LibreOffice - Microsoft Office

This page compares the features of LibreOffice and Microsoft Office in several form factors.
The comparisons separate major and minor feature differences and also includes notes on LibreOffice extensions.
The comparison highlights differences and therefore does not display any features which are present in both office suites.

LibreOffice UDF

Because LibreOffice is a fork from OpenOffice, this UDF will, in many places, work with OpenOffice as well. Unfortunately, as this UDF was being developed, I did not keep a record of the methods and properties that indicated they were added in certain LibreOffice versions, as well as the ones that seem to be not documented. Trial and error is the best method for now, with the addition of saying that any functions that list a minimum LibreOffice version, will most likely NOT be compatible with OpenOffice.

LibreOffice Object Model

The LibreOffice UDF is a wrapper for the complex LibreOffice object model. It hides the complexity of the object model and replaces it with a few AutoIt function calls.
The functions provided by the UDF cover most of the functionality that is typically required.
However, if you need more complex functions, you will have to write them yourself. First, you need to familiarize yourself with the LibreOffice API.

Limitations

  • The UDF works ONLY for the installed version of LibreOffice, not the portable version.
  • The UDF is written using the English version of LibreOffice, and may only work for the English version of LibreOffice installations.
  • Many functions in this UDF may or may not work with OpenOffice, however some settings are definitely for LibreOffice only.
  • For those using older AutoIt versions, several functions use Maps. In older AutoIt installations, a syntax error will be reported due to this.

Big Picture

Technical terms

Installation

Getting started examples

Function reference

Troubleshooting

Error messages and codes

Debug your Script

FAQ

Tools

References