Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Run VBS Script without QlikView Client

Hi,

in our company we run a server with no Qlikview Client (qv.exe) installed. I would like to execute a vbs script to automatically export an object from an application to an excel file without doing a reload. I found the page "http://community.qlik.com/docs/DOC-6923" which is describing exactly the vbs code that I need with one drawback...

This is the basic Code:
set fso = CreateObject("Scripting.FileSystemObject")
dim CurrentDirectory
CurrentDirectory = fso.GetParentFolderName(Wscript.ScriptFullName)
set qv = CreateObject("QlikTech.QlikView")
dim qvDocName
qvDocName = fso.BuildPath(CurrentDirectory, "..\App\AutomationTest.qvw")
set doc = qv.OpenDoc(qvDocName)
set chart = doc.GetSheetObject("CH01")
doc.Fields("Year").Clear
set yearValues=doc.Fields("Year").GetPossibleValues
dim curVal
for i=0 to yearValues.Count-1
curVal = yearValues.Item(i).Text
doc.Fields("Year").Select curVal
chart.ExportBiff(fso.BuildPath(CurrentDirectory,"..\Output\Report_" & curVal & ".xls"))
next
doc.CloseDoc
qv.Quit


In the vbs code the command "CreateObject("QlikTech.QlikView")" is used which requires a QlikView Client. Is there another way to execute the vbs Script which does not require a client?
I found that CreateObject("QlikTech.QlikViewBatch") is also a valid command but I was not able to execute the code with this change because of an error in the line "set chart = doc.GetSheetObject("CH01")" stating that the object "doc" does not exist.

I could not find anything regarding the use of the Object CreateObject("QlikTech.QlikViewBatch"). I would be glad if someone has an idea on how to resolve my issue.

Thanks in advance,
Martin

3 Replies
marcus_sommer

I'm not sure but I believe it won't work without a qv client. I found nothing for CreateObject("QlikTech.QlikViewBatch"), too - it could be only to use another settings.ini or if some options are set within the easter egg.

If you don't want to install a client on the server you could access these applications with a external client per network share. Further you could look into: Using EDX in QlikView 11 and otherwise you could create the chart-output per load-statement.

- Marcus

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You do not necessarily need a QV Client, but you will need the QlikView OCX for this code to work. This OCX is always installed together with the QlikView Desktop, or can be installed separately by running QvPluginSetup.exe from the QlkViewClients directory on your server.

However, no QlikView objects without a valid license. I wouldn't know how to run a plugin without an OEM OCX license...

Peter

Not applicable
Author


Hi,

thanks for your suggestions. I think it might work with the QlikView OCX but I simply got not enough time to test it, since I am not so familiar with the license model of qlikview. In the meantime I conviced the department of using a csv Output I am able to create from scipt (store ... csv). I think this is a much cleaner solution und easier to maintain.

Thank you for you quick resonses and best regards,

Martin