Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Have anyone run successfully a code to extract the scripts from QVW\QVFs files in QlikView into QVS using an external code such PowerShell, VBS, Python, etc.? The catch is that the code must
1. Loop all QVW\QVF files in a directory share folder (all sub-folders and files in those sub-folders).
2. Needs to run in non-interactive mode (back-end)
I have created a code in PowerShell, and it is running as expected, but it only runs through an interactive session. I used the concept build in the document analyzer version in https://qlikviewcookbook.com/2017/01/the-document-analyzer-compare-tool/ built by Rob Wunderlich. I have a challenge to run it in non-interactive mode as the code can only open the QlikView application using COMObject cmd:
$qv = New-Object -ComObject QlikTech.QlikView
How can I open the QlikView application as it would be running from QMC (task)?
Thank you for any advice
I think my Script Repository tool is just about what you need:
Qlikview Cookbook: Script Repository https://qlikviewcookbook.com/recipes/download-info/script-repository/
It was designed to be capable of running non-interactive, but I just tested and had to make a couple of tweaks.
1. In the ScriptRepository_V19.qvw, open the Module and copy all the vbscript. Paste the copied script into a new file ScriptRepository.vbs.
2. Edit the vbs file and make the following changes.
a. Function IsInternal: just force it to always false like this:
CONST EXTRACT_LOGFILE_NAME = "QvScriptExtract.log"
rootInDir = WScript.Arguments(0)
rootOutdir = WScript.Arguments(1)
Call MainExtractScript
Save the vbs file and now you can run from command line like:
cscript //NoLogo ScriptExtract.vbs c:\your-qvw-dir c:\script-output-dir
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
I think my Script Repository tool is just about what you need:
Qlikview Cookbook: Script Repository https://qlikviewcookbook.com/recipes/download-info/script-repository/
It was designed to be capable of running non-interactive, but I just tested and had to make a couple of tweaks.
1. In the ScriptRepository_V19.qvw, open the Module and copy all the vbscript. Paste the copied script into a new file ScriptRepository.vbs.
2. Edit the vbs file and make the following changes.
a. Function IsInternal: just force it to always false like this:
CONST EXTRACT_LOGFILE_NAME = "QvScriptExtract.log"
rootInDir = WScript.Arguments(0)
rootOutdir = WScript.Arguments(1)
Call MainExtractScript
Save the vbs file and now you can run from command line like:
cscript //NoLogo ScriptExtract.vbs c:\your-qvw-dir c:\script-output-dir
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
I will test this out, but looks promising. Thanks @rwunderlich
You have to tweak it to look for qlikview qvf as well as qvw.
-Rob
It is working as expected, and running in the non-interactive (non opening QV Desktop). Added the option to allow both QVW or QVF files and worked too.
Thanks