Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Access hidden tab in macro

    Hi guys,

is it possible to acces the content of hidden tab in macro pragmatically?

Saurabh

8 Replies
srchilukoori
Specialist
Specialist

yes, what are you trying to implement?

Not applicable
Author

I have to change the content of my hidden script for each user who access it.

Can you please tell me how we can access the hidden script?

srchilukoori
Specialist
Specialist

Is it hidden tab or hidden script?

Not applicable
Author

it is hidden script...the thing that we create by going to File->Create Hidden script.

Is hidden tab something else in QB?

I am very new to QV so please excuse me for my ignorance.

But what is difference between Hidden tab and Hidden script?

And can we change hidden script?

srchilukoori
Specialist
Specialist

Script can't be changed based on the user who logged in.

However, you can access the charts in the hidden tabs (sheets) with macros like export to excel etc.

Not applicable
Author

I just saw that ActiveDocument.DocumentProperties().Script which gives us the whole script but the hidden script as string and we might change it save it back.

So i thought there might be a way to access the hidden script by providing the password.

Not applicable
Author

Hi Ramya,

The only way to access the hidden script is by editing scritp providing the password. Probably you can not do this through a macro.

mattydolan
Contributor
Contributor

It's possible to modify and read hidden script using VBScript using the ActiveDocument.GetCovertScript and ActiveDocument.SetCovertScript functions. 

Link: https://community.qlik.com/t5/QlikView-Scripting/Managing-Hidden-Script/td-p/1165353

There is some information in the APIGuide but it seems only from 2013 version onwards which I can't find a direct download link (it's available upon install of Qlikview with Manual/Help however I can't re-install Qlikview on my machine)

I've pasted some VBScript for those still interested (it took me a while to find this)

Sub ReadHiddenScript
stOldScript = ActiveDocument.GetCovertScript("pass")
msgbox(stOldScript)
End Sub
 
Sub WriteHiddenScript
stNewScript = "//New Script"
blSuccessful = ActiveDocument.SetCovertScript("pass",stNewScript)
msgbox blSuccessful
End Sub
 
I'm planning to use this to modify hiddenscript on the fly by reading the whole script and replacing certain sections and then writing it again.