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

Macro to open a new qlikview document

Hi at all,

In a Qlikview document I wrote a macro that it allows me to fill an excel through an input box.

Now i would like, with the same macro, open a new qlikview document specifyed for that excel. The macro should be able to:

1. open a new qlikview document

2. give it the excel in input

Please, help me

Thanks

Lorenzo

3 Replies
el_aprendiz111
Specialist
Specialist

Hi Lorenzo

SUB OpenQV
set app=activedocument.getapplication
set newdoc=app.opendoc("C:\xxx\xxx\yy\yy\y\file.qvw","","")
newdoc.activatesheetbyid "SH09"
END SUB

Not applicable
Author

Hi Fer,

thanks for your answer, but i must ask you a clarification:

- how can i fill in the path? What do you mean with (,"","")?

- Why this newdoc.activatesheetbyid "SH09"

Thanks in adv,

Lorenzo

el_aprendiz111
Specialist
Specialist

Hi Lorenzo

- how can i fill in the path? What do you mean with (,"","")?  Optional

http://help.qlik.com/en-US/qlikview-developer/12.1/Subsystems/Automation/Content/automation-access-q...

SUB OpenQV
set app=activedocument.getapplication
set newdoc=app.opendoc("C:\xxx\xxx\yy\yy\y\file.qvw")
newdoc.activatesheetbyid "SH09"
END SUB

- Why this newdoc.activatesheetbyid "SH09"

automatically activates the sheet you want, if the document qvw has more than 1