3

As you can see in my script below, I am trying to use SendKeys to send Ctrl+Shift+S to show all sheets and objects in QlikView, but it does not work. However, if I send some other keys like "^s" (Ctrl+S) then it works fine.

Set objShell = CreateObject("Wscript.Shell")
Set Qv = CreateObject("QlikTech.QlikView")

Qv.OpenDoc "C:\Program Files\QlikView\Examples\Documents\Executive Dashboard.qvw"
set QvDoc = Qv.ActiveDocument
Wscript.Sleep 1000
objShell.AppActivate QvDoc.GetApplication.GetProcessId
objShell.SendKeys "^+s"
i_saw_drones
  • 3,486
  • 1
  • 31
  • 50

1 Answers1

1

In this particular case, the "Show All Sheets and Objects" option (which is triggered by the hidden key combination Ctrl+Shift+S) is actually a user privilege and forms part of the overall document security, whereas something like save is not normally a user privilege.

As document security is very important, I believe that QlikTech disabled write access to that setting. This means that it is read only via COM. It may not appear clear why any of that should affect you, however, as you are simply passing key combinations. However, as you are instantiating QlikView via COM, I believe that the QlikView application detects this and therefore automatically disables any key combinations which could alter the user permissions for the document.

An alternative cause of this could be that the QlikView document is running in user mode rather than admin mode and as such this would also disallow changing of user privileges, so it is perhaps worth to check the SECTION ACCESS on the document.

An alternative could be to control the visibility of your hidden sheets with a condition that points to a variable, and then alter the variable to show the hidden sheets with your Windows script. Further reading on this solution and other discussion may be found here: http://community.qlik.com/thread/36719#155925

i_saw_drones
  • 3,486
  • 1
  • 31
  • 50