Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Would you advise if it is possible to use loop (For...Next) to create table/Store it in a automated manner?
I have created a table like this, like 'Source' table
| t | s |
|---|---|
| AAA | AAaaAA.xlsx(ooxml, embedded labels, table is a) |
| BUT | cSisdsDI.xlsx(ooxml, embedded labels, table is b) |
| HWI | SAsdA.xlsx(ooxml, embedded labels, table is c) |
| SSR | dfd.xlsx(ooxml, embedded labels, table is dofa0) |
Preferred loading script is:
For i=0 to 3
LET Tbl=PEEK('Source',$(i),'t');
LET Src=PEEK('Source',$(i),'s');
$(Tbl): LOAD * from $(Src);
STORE $(Tbl) into $(Tbl).QVD (QVD);
DROP TABLE $(Tbl);
LET Tbl='';
LET Src='';
NEXT
Well, it does not fill the value, and run into error, that "unknown statement : LOAD * from;
I would appreciate for any help.
You got the order within the peek function to be incorrect:
Try this:
Source:
LOAD t,
s
FROM
[https://community.qlik.com/thread/167174]
(html, codepage is 1252, embedded labels, table is @1);
For i=0 to 3
LET Tbl = PEEK('t',0,'Source');
LET Src = PEEK('s',0,'Source');
$(Tbl): LOAD * from $(Src);
STORE $(Tbl) into $(Tbl).QVD (QVD);
DROP TABLE $(Tbl);
LET Tbl='';
LET Src='';
NEXT
You got the order within the peek function to be incorrect:
Try this:
Source:
LOAD t,
s
FROM
[https://community.qlik.com/thread/167174]
(html, codepage is 1252, embedded labels, table is @1);
For i=0 to 3
LET Tbl = PEEK('t',0,'Source');
LET Src = PEEK('s',0,'Source');
$(Tbl): LOAD * from $(Src);
STORE $(Tbl) into $(Tbl).QVD (QVD);
DROP TABLE $(Tbl);
LET Tbl='';
LET Src='';
NEXT
Yes you are right, and sorry for my mistake.
No problem my friend. I am glad we were able to pin-point it quickly.
Best,
Sunny