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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text file into variable

Good morning all !

Someone know how can I insert the content of a text file into a variable in the script ?

Thanks a lot

1 Solution

Accepted Solutions
amars
Specialist
Specialist

Hi Victor,

It is same as declaring a Variable inside your script.

Write

Let vTest = 'Test Load';   

inside your text file.

Now Gp to your Dashboard -> Edit Script -> Insert -> Include Statement -> Then select the Text File just created.

Load the Dashboard and see the Variable is created inside your dashboard.

Thanks.

Amar

View solution in original post

3 Replies
amars
Specialist
Specialist

Hi Victor,

It is same as declaring a Variable inside your script.

Write

Let vTest = 'Test Load';   

inside your text file.

Now Gp to your Dashboard -> Edit Script -> Insert -> Include Statement -> Then select the Text File just created.

Load the Dashboard and see the Variable is created inside your dashboard.

Thanks.

Amar

Not applicable
Author

Hi !

I does not work, I've got an error on the line :

tab2 = $(Include=c:\users\vboudart\desktop\modeli\appli\textfile.txt);

The content of my text file is like this : France,Belgium,USA,   .....................

Not applicable
Author

Ok, I have add ' like this ;

LET tab = '$(Include=c:\users\vboudart\desktop\modeli\appli\textfile.txt)';

and it's work.

Thanks

Victor