Access OpenOffice spreadsheet

The Application Programming Interface and the OASIS Open Document Format
Post Reply
Haripriya
Posts: 1
Joined: Wed Oct 16, 2019 1:09 pm

Access OpenOffice spreadsheet

Post 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).
OpenOffice 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 33475
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Open office

Post 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.
Apache OpenOffice 4.1.12 on Xubuntu 20.04.4 and very infrequently on Win2K/XP
User avatar
Zizi64
Volunteer
Posts: 10428
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Open office

Post 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.
Tibor Kovacs, Hungary; LO6.1.6, 6.4.7 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.1.1;AOO4.1.9
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 1925
Joined: Wed Mar 09, 2016 2:40 pm

Re: Access OpenOffice spreadsheet

Post 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.

https://www.openoffice.org/udk/common/m ... 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.
Last edited by JeJe on Thu Oct 17, 2019 11:11 am, edited 1 time in total.
Openoffice 4.1.6
Windows 8
User avatar
Zizi64
Volunteer
Posts: 10428
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Access OpenOffice spreadsheet

Post 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.
Tibor Kovacs, Hungary; LO6.1.6, 6.4.7 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.1.1;AOO4.1.9
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply