- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Binary Statement through vbscript
I am trying to create the QlikView Document and add the binary statement using the vbs script. I am able to create the Document and open the Edit script using the below vb script
Set objFSO = CreateObject("Scripting.FileSystemObject")
set qv = CreateObject("QlikTech.QlikView")
Set docObj = qv.CreateDoc
docObj.DialogEditScript
But not finding the way to add the Binary Statement and the Load script. Any suggestions to include the Binary statement and Load script in the above macro
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try it with:
docprop.Script = "Binary C:\Users\sds\Desktop\ttt.qvw;" & docprop.Script
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a look on this example from APIGuide.qvw:
rem ** add new line to script **
set docprop = ActiveDocument.GetProperties
docprop.Script = docprop.Script & "Load * from abc.csv;"
ActiveDocument.SetProperties docprop
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Marcus for your response.
i tired it for the Binary Load is coming after the set statement. like this
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
Binary C:\Users\sds\Desktop\ttt.qvw;
where as i need to place Binary statement. If we are able to clear the set statements then the problem is resolved .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try it with:
docprop.Script = "Binary C:\Users\sds\Desktop\ttt.qvw;" & docprop.Script
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Marcus for trying to help me out and really appreciate your quick response.
Still the set statements are there
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
Binary C:\Users\sds\Desktop\ttt.qvw;///$tab Main
SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
I used the script as
Set objFSO = CreateObject("Scripting.FileSystemObject")
set qv = CreateObject("QlikTech.QlikView")
Set docObj = qv.CreateDoc
docObj.DialogEditScript
set docprop = docObj.GetProperties
docprop.Script = docprop.Script & "Binary C:\Users\sds\Desktop\ttt.qvw;"& docprop.Script
docObj.SetProperties docprop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marcus,
Thanks for your support. I am not able to close the edit script with macro. I tried to search the API guide but couldn't able to get the details. It would be helpful if you could provide some inputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try:
docObj.closedoc 'close application
qv.GetApplication.Quit 'close qlikview
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Marcus,
I tried it is not closing the editscript window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
docObj.GetApplication.Quit
or
ActiveDocument.GetApplication.Quit
- Marcus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for your support
Set objFSO = CreateObject("Scripting.FileSystemObject")
set qv = CreateObject("QlikTech.QlikView")
Set docObj = qv.CreateDoc
docObj.DialogEditScript
docObj.CloseDoc
docObj.GetApplication.Quit
it is not working
- « Previous Replies
-
- 1
- 2
- Next Replies »