Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

open 1st sheet from external file 1 and 2nd sheet from external file 2.

i have a qvw file. it has two sheet.

i want to open 1st sheet from external file 1 and 2nd sheet from external file 2.

is it possible?

if someone send me the sample then it will help me a lot.

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi abcd

The best way I can think of is to use the /v switch to set a variable value when you open the file, and then use an macro on a document OnOpen trigger.

Create the trigger on Document Properties | Triggers (under Document Event Triggers). Add an Activate Sheet action and write an expression in the SheetID box:

='SH0' & vStartPage

(assuming the sheets have sheet IDs SH01 and SH02).

Then call the model with this command line syntax:

<path>Qv.exe /vvStartPage=1 myModel.qvw - from external file 1

<path>Qv.exe /vvStartPage=2 myModel.qvw - from external file 2

This will cause the model to open with sheet 1 (SH01) activated in the first case and sheet 2 (SH02) in the second.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

thanks Jonathan.

i am sending you my qvx file and two external source file.
please let me know what is wrong in my design

regards

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The attached zip contains the updated QV file and two batch files, one opening page A (SH01) and the other page B (SH02). Unzip everything into c:\Test on your PC.

  • "C:\Program Files\QlikView\qv.exe" /vvStartPage=1 C:\Test\sheet_calling.qvw
  • "C:\Program Files\QlikView\qv.exe" /vvStartPage=2 C:\Test\sheet_calling.qvw

The batch files assume that you have installed QV to C:\Program Files\QlikView\qv.exe. If not, edit the batch files to the correct path for QV.

The batch files assume that the QV is in c:\Test. If you want to put it somewhere else, edit the path for the QV document.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein