Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all
please refer the below link
http://http//qlikviewmaven.blogspot.com/2008/09/loading-all-of-files-from-.html
http://qlikviewmaven.blogspot.com/2008/09/loading-all-of-files-from-folder.html
in this they are explaining about. hoe to load all excel files from a folder. Now I want to know I have a folder called YEAR in that YEAR folder I have different folder called 2009, 2010, 2011 and 2012.
Now I want to load all files from all these year folder by using * but it wont work in folder. Is there any other option to achieve this.
Regards,
Sheela,
Although Vijay's proposal will work and is easy to unterstand (in this simple case), I personally prefer constructs like
set vBaseDir = '\\whereever\your\subfolders\may\be';
for each vYear in '2009', '2010', '2011', '2012'
directory '$(vBaseDir)\$(vYear)';
for each vFile in filelist('$(vFileBaseName)*.xls')
load
*
from
$(vFile) (whatever has to be here to load your xls-files correctly);
next vFile
;
next vYear
;
Although this may look a bit complicated, it will give you more control over what will be loaded.
Hope this will help.
Greetings,
Edgar
Hi Usha,
You can use loop here
For i=Startyear to EndYear
Load
*
From ..\Data\$(i)\*.xls
Next i
Hope this will help.
Hi vijay
thanks for your reply, prob in startyear and endyear things. will you please attach your application. It will help me a lot.
Regards,
Sheela
Hi ,
I am using personal edition so I cant share my apps.
If you know what is you first year and last year then you can create variablesn and use them:
Let StartYear = 2008;
Let EndYear=2012;
For i=$(StartYear) to $(EndYear)
Load *
...
Next i
Hope this will help.
Although Vijay's proposal will work and is easy to unterstand (in this simple case), I personally prefer constructs like
set vBaseDir = '\\whereever\your\subfolders\may\be';
for each vYear in '2009', '2010', '2011', '2012'
directory '$(vBaseDir)\$(vYear)';
for each vFile in filelist('$(vFileBaseName)*.xls')
load
*
from
$(vFile) (whatever has to be here to load your xls-files correctly);
next vFile
;
next vYear
;
Although this may look a bit complicated, it will give you more control over what will be loaded.
Hope this will help.
Greetings,
Edgar
Do you know what happened to the links? I am not able to open it 😞