Calc Macro

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
det
Posts: 86
Joined: Fri Mar 31, 2017 8:24 pm

Calc Macro

Post by det »

I wrote a macro for a Spreadsheet and like to send it either by email or flash drive to another person who should be able to run the macro. If I copy to a flash drive or attach to an email, the macro is lost. What do I and the recipient have to do to keep the macro attached to the spreadsheet? Is there an answer to my problem?
Det
OpenOffice 4.1.5 on Mac Sierra 10.13.1
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Macro

Post by Zizi64 »

1.: Use the native, International Standard ODF fileformats (.ods in this case).
2.: Embed the macro into the document. The receiver must be use the one of the opensource office suites (AOO or LO), and must set the macro security to "Medium" if he/she want to run the macros embedded in the downloaded ODF document.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
det
Posts: 86
Joined: Fri Mar 31, 2017 8:24 pm

Re: Calc Macro

Post by det »

Thank you, it worked with sending ods.
My question, however, was misleading. I now realize it should have been:
I wrote in ods,(macro worked) then I saved as xls (macro worked).
How can I send the xls version with the macro attached?
The recipient has only xls. Is there a better way than sending the macro separately in a Document and let the recipient paste it into the module?
Det
OpenOffice 4.1.5 on Mac Sierra 10.13.1
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc Macro

Post by RoryOF »

Different underlying engines in OpenOffice and in Excel; macros don't work across the different platforms.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc Macro

Post by Zizi64 »

wrote in ods,(macro worked) then I saved as xls (macro worked).
How can I send the xls version with the macro attached?
The recipient has only xls.
The API of the AOO and the MS VBA of the Excel are NOT compatible. AOO macros can not run in Excel. The simpliest MS VBA macros can run in the LibreOffice, because LO has a littlebit higher compatibility with the foreign fileformats and the MS VBA.

But you must use the API functions and the native fileformats, if you want work efficiently with the AOO and the LO.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
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.
det
Posts: 86
Joined: Fri Mar 31, 2017 8:24 pm

Re: Calc Macro

Post by det »

Thank you for the answers.
To solve my problem I would have to program in Excel.
Det
OpenOffice 4.1.5 on Mac Sierra 10.13.1
Post Reply