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: 
Anonymous
Not applicable

Calling Command Prompt through VB script

 

Hello,

 

I am trying to call the command prompt, to execute a particular line of code, through the VB Editor in QlikView.

 

If I was to execute this statement in the LOAD script, the code would be as follows:

EXECUTE "C:\Program Files\R\R-3.2.4\bin\Rscript" "C:\QlikView TEST\1 - R programming\QlikViewTEST3.R" CMD;

 

Here the code essentially:

1: calls R through the command prompt

2: loads the R file called ‘QlikViewTEST3.R’

3: executes the scripts contained in ‘QlikViewTEST3.R’

4: closes R

 

My question is: how could I implement the same statement through the VB Editor, instead of through the LOAD statement.

 

Unfortunately my VB is not great, so I would appreciate any help.


Sincerely,
Michael

 

3 Replies
MarcoWedel

Anonymous
Not applicable
Author

Hi Marco, I appreciate your help. Unfortunately, while I already have R integrated with QlikView through an API, this is not a robust solution. As such, I am looking to load a batch file into R and execute the scripts through the command prompt instead, and then reload the QlikView app.

marcus_sommer

Maybe a run-statement like the following could be helpful: QlikView Maven: QlikView Command Line and Automation

Set objShell = CreateObject("WScript.Shell")
objShell.Run """c:\Program Files\QlikView\QV.exe"" /r /vbatch_flag=1 c:\reports\Inventory.qvw"

- Marcus