Page 1 of 1

[Solved] How to get the active sheets index?

Posted: Sat Sep 14, 2013 4:13 am
by cleanman2
I am using Python.

Code: Select all

doc = XSCRIPTCONTEXT.getDocument()
oSheets = doc.getSheets()
sSheet = doc.getCurrentController().getActiveSheet()
name = sSheet.Name
Will get me the name of the active sheet. How do I get it's index?

Thanks, Jim

Re: How to get the active sheets index?

Posted: Sat Sep 14, 2013 5:31 am
by Charlie Young

Code: Select all

sSheet.RangeAddress.Sheet

Re: How to get the active sheets index?

Posted: Sat Sep 14, 2013 4:41 pm
by cleanman2
Thank you, that worked. Knew it was something simple, just couldn't come up with it.

Regares, JIm