Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
marcel_olmo
Partner Ambassador
Partner Ambassador

Is there any way to get the Id of a sheet? Or the list of them?

Sorry mates, I've been lookin at the API Guide, and I can't find what I'm looking for.

I know that I can find all the object id's of a sheet with the function :

ActiveDocument.ActiveSheet.GetSheetObjects

But what about if I want to know the list of the id's of all the sheets??

Many thanks in advance!!!

1 Solution

Accepted Solutions
Not applicable

you can use this one:

sub LoopSheet

for i = 0 to ActiveDocument.NoOfSheets - 1

set ss= ActiveDocument.GetSheet(i)

msgbox(ss.GetProperties.SheetId)

next

end sub

hope this works...

QlikView Icon

View solution in original post

4 Replies
Not applicable

try to use this as your guide:

Sub SheetID

set mysheet=ActiveDocument.ActiveSheet

set sp=mysheet.GetProperties

Sid = sp.SheetID

msgbox("Sheet ID = "&Sid)

End Sub

QlikView Icon

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

thanks mongz for your quick reply.

I know I can get the current sheet Id, but the point is, how can I get the others? This is what I can't find for.

Thanks in advance!

Not applicable

you can use this one:

sub LoopSheet

for i = 0 to ActiveDocument.NoOfSheets - 1

set ss= ActiveDocument.GetSheet(i)

msgbox(ss.GetProperties.SheetId)

next

end sub

hope this works...

QlikView Icon

marcel_olmo
Partner Ambassador
Partner Ambassador
Author

Thank you very much mOngkz

that was what I was looking for.

See you around!!