Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I create a batch file

How can I create a batch file with the following fields,which are mentioned in the attachment.

4 Replies
pover
Partner - Master
Partner - Master

Do you want to create a vbscript file to run those macros externally?

Not applicable
Author

Hi Karl,

Thanks for your co-ordination.Let me explain you briefly.

Suppose I have some information in the report(the information contains with various company )that I will have to send to various person by email for a particular company and it should be send by 1click,but the main thing is that it should take only the required data from the report(I mean to say by filtering).

Presently, it will work by one by one email sending,but I want to do this dynamically,just I will select the company name and the corresponding mail id will be selected and it will filtering the required data which will need to send to the company.

pover
Partner - Master
Partner - Master

Create a file called export.vbs and have it contain something like the following (not tested).

Set MyApp = CreateObject("QlikTech.QlikView")
Set MyDoc = MyApp.OpenDoc (X:\MyQlikviewfile.qvw","","")
Set ActiveDocument = MyDoc

set val=ActiveDocument.Fields("Company").GetOptionalValues
for i=0 to val.Count-1

ActiveDocument.Fields("Company").Select val.Item(i).Text 'Selects a Company
ActiveDocument.GetSheetObject("BU01").Press 'Runs Export Macro

next

You can then set up QV Publisher or Windows Job Scheduler to run the job automatically.

Regards.

Not applicable
Author

Hi Karl,

Thanks for your code.I have tested the code & found some debug,so can you send me any sample file to run my application successfully & that would be helpful for my application.

Thanks & Regards.