store content in txt file into a variable in qlikview

388 views Asked by At

I have a path stored in a txt file in Qlikview 11, what is the right syntax to store that path in a variable?

txt file found in: C:\Projects\X\Shared-COntent\filepath.txt

Content of the txt file is a network path

Thank you!

1

There are 1 answers

0
Stefan Stoichev On BEST ANSWER

You can load the txt file as a normal table file and then peek the loaded value. Something like this:

NetowrkPath:
LOAD 
    @1 as NetworkPath
FROM
    [C:\Projects\X\Shared-COntent\filepath.txt] (txt, utf8, explicit labels, delimiter is '\t', msq)
;

let vNetworkPath = peek('NetworkPath'); // <-- this is the variable that will contain the network path
Drop Table NetowrkPath;