Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how can i restrict my .qvw file not to be used in any binary load

Hi Team, 

Could you please advise how can i restrict my .qvw file not to be used in any binary load. 

ex. I have created a .qvw file and i don't want it to be used in binary load by anyone, please Advise. 

thanks,

Shiv

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

The second part assumed a metadata source table. You can exclude the second part.

Let zFileName = DocumentPath();

Set ErrorMode = 0;

VariableDescription:

LOAD

  Name   As SOE.Name,

  RawValue   As SOE.Definition

FROM [$(zFileName)] (XmlSimple, Table is [DocumentSummary/VariableDescription])

Where Not(IsReserved = 'true' Or IsConfig = 'true');

Set zFileName = ;

Set ErrorMode = 1;

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

View solution in original post

11 Replies
tracysmart
Creator II
Creator II

In Document Properties - Opening - Prohibit Binary Load tick box should prevent it.

Anonymous
Not applicable
Author

goto document Settings / opening and tick "prohibit binary load"

Not applicable
Author

thanks, got it.

One more question, Without using Macros, can i save variables used in .qvw with their definition in excel.

avinashelite

Check the Prohibit Binary Load option in Document Properties - Opening

avinashelite

only way to implement this without macro is to Define the variable in the script level and then export to the format you required

jonathandienst
Partner - Champion III
Partner - Champion III

You can use this code fragment added to your load script:

Let zFileName = DocumentPath();

Set ErrorMode = 0;

VariableDescription:

LOAD

  Name   As SOE.Name,

  RawValue   As SOE.Definition

FROM [$(zFileName)] (XmlSimple, Table is [DocumentSummary/VariableDescription])

Where Not(IsReserved = 'true' Or IsConfig = 'true');

Left Join (VariableDescription)

LOAD SOE.Name,

     Comment as SOE.Comment,

     Type as SOE.Type

FROM [\\$(vComputerName)\afs\qvdata\config\aum\Variable Comments.xlsx]

(ooxml, embedded labels, table is Sheet1);

Set zFileName = ;

You will get a table with the SOE.Name (var name), SOE.Definition, SOE.Comment (if a comment was defined), and SOE.Type (eg system variable). You can use these fields in a pivot, or spit the table out as a csv.

This will get the variable definitions from the meta data. Be aware that these are the values before the current reload (when the document was last saved).

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

The second part assumed a metadata source table. You can exclude the second part.

Let zFileName = DocumentPath();

Set ErrorMode = 0;

VariableDescription:

LOAD

  Name   As SOE.Name,

  RawValue   As SOE.Definition

FROM [$(zFileName)] (XmlSimple, Table is [DocumentSummary/VariableDescription])

Where Not(IsReserved = 'true' Or IsConfig = 'true');

Set zFileName = ;

Set ErrorMode = 1;

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

jontydkpi‌‌ Nice !! Thanks for sharing

What are the other details we can extract from the documents ?? like last modified , change in size etc

Not applicable
Author

thanks, this piece of code helped me lot.