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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

import variables from another document

Hello

Attached is a macro that exports variables and their values or expressions to a text file

Is there a way to import these variables and their expressions to a new qvw document?

Please advise

I can walk on water when it freezes
1 Reply
fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

1. adjust your macro from:

txsStream.WriteLine v.Name  & chr(9) & v.RawValue

to:

txsStream.WriteLine "set " & v.Name & " = '" & v.RawValue & "';"

2. copy the content of the generated text file to the script section of your new QVW

3. reload the document

There you go, the variables will be created in your new document. Maybe you'll need to do some adjustments if your variables have complex expressions with single and double quotation marks, this can confuse QV when you put it in the script.

(it is quite simple, I hope I understood right your requirement.... )

Regards,

Fernando