LibreOffice is an open source Office suite, which includes word processor, spreadsheet, database, presentation tools, and more.
It is a branch off of OpenOffice and uses open standards as default for its files. If you are used to the most recent versions of Microsoft Office, there will be a little bit of a learning curve due to different location of similar commands in the menu structure, and sometimes slightly different solution to the same problem. But once you are used to it, you can do the same at a much lower cost.
Automation can be done in different programming languages such as Python, Java, by adding plug ins.
The only downside of both LibreOffice and OpenOffice is that they tend to be a bit sluggish compared to the MS offering, which is probably due to programming in Java. But this does translate into an advantage fro both LibreOffice and OpenOffice: they are not tied to a single operating system. All Linux distributions include them in their repositories and Windows installers can be downloaded from the LibreOffice and OpenOffice websites: