[Solved] How do I get the sheet index?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
antrrax
Posts: 6
Joined: Wed Feb 13, 2019 10:50 pm

[Solved] How do I get the sheet index?

Post by antrrax »

I have an object with my sheet, which was created from the sheet name.

Code: Select all

Dim oDoc, oMySheet As Object

oDoc = ThisComponent
oMySheet = oDoc.Sheets.getByName("Base")
How do I get the index this sheet: 'oMySheet' ?

Thanks!
Last edited by antrrax on Tue Mar 05, 2019 6:19 pm, edited 1 time in total.
OpenOffice 4.1.6
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How do I get the sheet index?

Post by Zizi64 »

Code: Select all

iSheetNr = oMySheet.RangeAddress.Sheet
Ibstall and use one of the excellent object inspection tools, like the XrayTool and MRI.
XrayTool.png
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.
antrrax
Posts: 6
Joined: Wed Feb 13, 2019 10:50 pm

Re: How do I get the sheet index?

Post by antrrax »

Thank you, that's what I needed.

I'll start using XrayTool
OpenOffice 4.1.6
Post Reply