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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anil_Babu_Samineni

Variable

Hi,

I have variable file like attachment.

I want to import these variables from one QVW to another QVW.

I want to show same as a.qvw variable to b.qvw variables with Values

- Anil

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You have to use something like below loop..

Temp_Variables:

LOAD Name,

     Expression

FROM

YourFileName.xlsx

(ooxml, embedded labels, table is Variables);

For i=0 to NoOfRows('Temp_Variables')-1

  Let vName = Peek('Name', i, 'Temp_Variables'); //Name of Variables

  Let $(vName) = Peek('Expression', i, 'Temp_Variables'); //Definition of Variables

NEXT i;

Let i = null();

Let vName = null();

// Remove temp tables

Drop Table Temp_Variables;

View solution in original post

13 Replies
MK_QSL
MVP
MVP

You can create an input box and add all variables here.

now using send to excel you can import them in an excel file.

now use below to use them in another qvw.

http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/

bindu_apte
Creator III
Creator III

Frank_Hartmann
Master II
Master II

You can try with attached macro.

With first macro you can save all your variables to excel sheet and with the second you can import these Variables into another qvw.

hope that helps!

Anil_Babu_Samineni
Author

Manish,

Thanks for attempting.

I have Thousands of Variable, It takes time to add is there any other option to create a variable with that Variables??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Frank_Hartmann
Master II
Master II

this might be helpful too!

How to store and recover variables

MK_QSL
MVP
MVP

Great.. I haven't seen any application with THOUSANDS of variables...

Anil_Babu_Samineni
Author

Frank,

In that Variable it showing only Excel. But, I want to show all over here with Directly.

  

vImport1='Imported variable #1'
vImport2=Replace('$(vImport1)', '1', '2')
vImport3=Left('$(vImport2)', Len('$(vImport2)') - 1) & (Right('$(vImport2)', 1) + 1)

Variable.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni
Author

Might be Previous Developer is Mad.

Anyway, Can i know After send to excel it showing like = as well.

Do we require to delete that field in Excel or what?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MK_QSL
MVP
MVP

You can delete the 2nd field having '=' and use the link which is given...
This will allow you to import variables using excel file.