Page 1 of 1

Access OpenOffice spreadsheet

Posted: Wed Oct 16, 2019 1:55 pm
by Haripriya
Hi Folks,
Can u pls let me know whether we can programmatically access open office spreadsheet..
i am trying to use open office excel as an alternative for microsoft excel

i used to read excel, copy, paste, merge cells, processing macros all these functions i have programmatically using c# in microsoft office using libraries like interop excel and epplus

Can all these activities be done in open office spreadsheet programmatically in c# using compatible libraries for open office

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply (Hagar, Moderator).

Re: Open office

Posted: Wed Oct 16, 2019 2:04 pm
by RoryOF
Yes, all this can be done in OpenOffice, but you will need (read: MUST) rewrite all your macros. Better to stick with Excel if that is working for you - the cost of Excel will be less than the true cost in time and effort of migrating to OpenOffice.

Re: Open office

Posted: Wed Oct 16, 2019 4:16 pm
by Zizi64
Try the LibreOffice. It has a littlebit higher compatibility level with the VBA macros, but it is better to rewrite all your Excel macros based on the AOO/LO API. API : Application Programming Interface.

Re: Access OpenOffice spreadsheet

Posted: Wed Oct 16, 2019 9:37 pm
by JeJe
OpenOffice macros can be written in OpenOffice Basic, Python, Beanshell, and Javascript but not c#.

On Windows you can use automation to control OpenOffice though and use different languages. ... ation.html

Your examples are very simple - copy, paste, merge cells - you could probably easily generate some (Basic) code to do these using the macro recorder.

Edit: oops corrected slip up - OpenOffice Basic.

Re: Access OpenOffice spreadsheet

Posted: Thu Oct 17, 2019 6:48 am
by Zizi64
OpenOffice macros can be written in Visual Basic, Python, ...
The Basic language and IDE of the Apache OpenOffice/LibreOffice is not same as the Visual Basic of the Microsoft.
It is the StarBasic (this name inherited from the ancestor: named StarOffice) and you can/must use together with the unique Application Programming Inteface functions and procedures of the AOO/LO.