Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is it possible in Qlikview to check if a csv-file is in a map and if it is, Qlikview should read this file.
The filename of the csv file is variable. It always starts with Time and a date.
Time20161215.csv, Time20161214, ...
Is it possible that if a file with Time*.csv exist I read all the Time*.csv files.
Can I make this script variable? Like
IF (NOT isNull(qvdCreateTime('..\\FileLocation\Time*.csv'))) THEN
But this isn't working.
This is what I have, but the first line in the script should be variable.
IF (NOT isNull(qvdCreateTime('..\\FileLocation\Time20161215.csv'))) THEN
Time:
Load @1 as Number,
@2 as Name
FROM
[..\\FileLocation\Time*.csv]
(txt, codepage is 1252, explicit labels, delimiter is ';', header is 1 lines);
END IF;
Regards,
Kris
Use a simple loop:
For each vFile in FileList('..\\FileLocation\Time*.csv')
Time:
LOAD
@1 as Number,
@2 as Name
FROM
[$(vFile)] (txt, codepage is 1252, explicit labels, delimiter is ';', header is 1 lines)
;
Next
If there are no csv files there then nothing will be loaded without any error being generated.
Use a simple loop:
For each vFile in FileList('..\\FileLocation\Time*.csv')
Time:
LOAD
@1 as Number,
@2 as Name
FROM
[$(vFile)] (txt, codepage is 1252, explicit labels, delimiter is ';', header is 1 lines)
;
Next
If there are no csv files there then nothing will be loaded without any error being generated.
use the variable to capture the time and date.
Thanx Gysbert,
This works!