Excel, OpenOffice and LibreOffice clients examples
Two examples are provided, with minimal differences:
- an Excel spreadsheet with a function developed in Visual Basic for Applications;
- a LibreOffice-OpenOffice spreadsheet with a function developed in StarOffice Basic, also called StarBasic or OOoBasic, a language prescribed by the designers of OpenOffice and LibreOffice.
These two Basic languages have syntaxes that are very similar and largely compatible, and it is sometimes possible to use an Excel spreadsheet under LibreOffice or OpenOffice and then re-save it in Excel format without losing the functionality of an attached macro. But this is not the case with the examples provided, which each use a Basic function called "Shell" whose operation is different on two essential points:
- the Excel version of this "Shell" function requires concatenating the path of the executable to be launched and the parameter string to be assigned to this launch, while the LibreOffice-OpenOffice version requests to separate these two strings into two distinct parameters;
- the Excel version of this "Shell" function has asynchronous operation (Excel does not wait for it to be executed to continue the execution of the macro) whereas the LibreOffice-OpenOffice version presents a synchronous operation, much easier to exploit.
- either configure all the launches of the Excel or LibreOffice-OpenOffice application, which will allow you to launch the spreadsheet without first launching the application
- either set an alias of the Excel or LibreOffice-OpenOffice application, and you will therefore have to launch the application by this alias before launching the spreadsheet
Last difficulty, downloading a spreadsheet incorporating a macro will often be prevented by anti-virus software. The two spreadsheets that TransBar proposes have been grouped together in a ZIP archive, but usually this elementary protection will not be enough to overcome the difficulty. This is why you will find below two links:
- this first link will download a ZIP file that may be stopped by your anti-virus system;
- this second link will download the same file with the suffix ".zip_transbar", which should deceive the anti-virus. Once this file is downloaded to your computer, it will be enough to rename it by removing "_transbar" of its extension to find a double-clickable archive suffixed ".zip".
These spreadsheets are currently only available in French.
Excel is the spreadsheet of the business offer "Microsoft Office".
OpenOffice is free software released by the Apache Foundation. It can be downloaded in English from the page opened by this first link.
LibreOffice is free software, based on the same sources as OpenOffice, published by The Document Foundation. It can be downloaded in English from the page opened by this second link.