Macro Tutorial

Creating a macro - Writing a Script - Using the API

Macro Tutorial

Postby chuck99 » Thu Jul 06, 2017 6:25 am

Are there any Calc macro tutorials? I have created some complicated macros in previous years, but I seem to be completely lost in modifying them now. The macros are in a separate sheet within the file.
OpenOffice 3.4.1 on Win xp pro sp3
chuck99
 
Posts: 14
Joined: Sun Sep 02, 2012 2:19 am

Re: Macro Tutorial

Postby Zizi64 » Thu Jul 06, 2017 6:44 am

Are there any Calc macro tutorials?

Yes, there are.

There are descriptions for the StarBasic, and for the API (Application Programmind Interface).
Start with Andrew Pitonyak's free books. Those books contain many useful informations and a lot of StarBasic + API examples:
http://www.pitonyak.org/oo.php

BasicGuide_OOo3.0.0.pdf:
https://www.google.hu/url?sa=t&rct=j&q= ... Vm2tYfdo0A

API descriptions:
http://www.openoffice.org/api/
http://api.libreoffice.org/


Or: are you using some other supported programming language for the API functions of the Office suite?
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.3 and AOO4.1.4
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6082
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Macro Tutorial

Postby Zizi64 » Thu Jul 06, 2017 6:50 am

I have created some complicated macros in previous years, but I seem to be completely lost in modifying them now. The macros are in a separate sheet within the file.

Can you upload that file here?
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.3 and AOO4.1.4
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6082
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Macro Tutorial

Postby keme » Thu Jul 06, 2017 9:43 am

Are your spreadsheets created in OpenOffice Calc?

From my memory - not confirmed by practical tests or info-searches:
Before VBA, Excel had those "worksheet macros", and IIRC there was something similar in Lotus 1-2-3 and/or SuperCalc. AFAIK the "legacy" macros in Excel will still run, but you can't edit them or enter new ones.
Never seen it in OpenOffice Calc. Even with its predecessor "Star Office", the StarBasic was a separate module ; no programming commands were entered within the spreadsheet grid.

"Worksheet macros" use a set of application specific commands, which I believe are not handled by import filters. IOW, they are not portable and none of them will run on Calc. (If my memory serves me right, that is.)
Apache OO 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 2663
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Macro Tutorial

Postby esperantisto » Mon Jul 17, 2017 4:10 pm

AOO 4.2.0 / LibO 5.0.2.1 / Win 7 / openSUSE Linux 11.3 (32-bit) / 13.2 (64-bit)
esperantisto
Volunteer
 
Posts: 457
Joined: Mon Oct 08, 2007 1:31 am

Re: Macro Tutorial

Postby Villeroy » Mon Jul 17, 2017 5:26 pm

chuck99 wrote:The macros are in a separate sheet within the file.

Are you referring to Excel 4 macros?

http://spreadsheetpage.com/index.php/si ... questions/

https://support.office.com/en-us/articl ... A010336614
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 16.04, OpenOffice 4.x & LibreOffice 5.x
User avatar
Villeroy
Volunteer
 
Posts: 24657
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 9 guests