Discussion Board for collaboration on QlikView Scripting.
I have month wise data in D drive. Say 09-2014,08-2014 and 07-2014.
How to get the data into qlikview based on the file name.
Go to Solution.
As I don't know your exact purpose, here you have some tools for file management:
If you want to know if a file exists or not:
if filetime('c:\mydata\my.qvd) then
//qvd doesn't exist
You can go further the filetime function to control which file you want to import or not, depending of its creation timestamp.
If you want to have a look in a folder:
FOR Each File in filelist ('.\BUFFER_*.xlsx')
(ooxml, no labels, table is Sheet1);
Maybe your solution needs a combination of all these.
Hope it helps.
Use a * as a wildcard instead of the full file name. The files will be concatenated if the fields have identical names.
So for instance:
load .... from 09-2014.qvd; will become
load ... from *.qvd;
Please explain the second code.
lets I have a file name AAA.txt and BBB.txt. can I load each based on the above code??
Load with a wildcard (*):
*.txt will load both files and concatenate the same fields.
In case you want to load every txt file in this folder, do:
load ... from *.txt;
In case you need to load both files but you can not asure they exist, do:
if filetime('AAAA.txt') then
load * from AAAA.txt;
if filetime('BBBB.txt') then
load * from BBBB.txt;