Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am new to Qlik view.I like to know how can i create Qvds using for loop.
for example i am having 20 Exel files in D;//,so i want these 20 files into qvd.
can u please share me the script for the above scinario. it will be helpfull to me.
regards
theja
Hi Theja,
If all files are having the same columns then you can just load using wild card characters in a single shot, no need of looping.
Try like this
R:
LOAD
*
FROM
C:\Users\664801\Desktop\QV\*.xls]
(biff, embedded labels, table is [Sheet1$]);
STORE R into FileName.qvd(qvd);
Hope this helps you.
Regards,
jagan.
Hi plz help me..
HI
Following is the for loop used to create the qvds
FOR vCount = 0 to NoOfTables()-1
LET vTableName =TableName($(vCount));
STORE $(vTableName) INTO $(vTableName).qvd (qvd);
NEXT vCount
Hi Theja,
Try this :
for i=0 to NoOfTables()-1
let vtabname=TableName(i);
STORE $(vtabname) into $(vtabname).qvd;
next
Hi
you can try like this .....
FOR i = 1 to NoOfTables()
LET vTableName = TableName($(i)-1);
LET vOutfile = '$(vTableName).qvd';
STORE [$(vTableName)] INTO [$(vOutfile)] (qvd);
NEXT i
thank u all for helping me..
Hi ,
You can use this script
just name your file in such a way that you can derived it inside for loop using i variable
for i=1 to 20
let vfilename = $(i) & '.xlsx';
Tab:
LOAD *
FROM
[$(vfilename)]
(ooxml, embedded labels, table is Sheet1);
store Tab into $(i)&'.qvd'(QVD);
next i
Regards,
Vivek Singh
Hi,
use this:
for i=1 to No of tables
R:
LOAD
*
FROM
C:\Users\664801\Desktop\QV\$(i).xls
(biff, embedded labels, table is [Sheet1$]);
STORE R into $(i).qvd(qvd);
NEXT
HTH
Ravi N,
Hi Theja,
If all files are having the same columns then you can just load using wild card characters in a single shot, no need of looping.
Try like this
R:
LOAD
*
FROM
C:\Users\664801\Desktop\QV\*.xls]
(biff, embedded labels, table is [Sheet1$]);
STORE R into FileName.qvd(qvd);
Hope this helps you.
Regards,
jagan.
Hi jagan,
thank for your answer...
I am not having the same columns in my files.the files which i am having r diffrent from one another.
can i use wildcard for the same.or i want to use loop.
thanks
theja