Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts.
I have one folder "DATA" in this folder i have two sub folders like "2016_01_01",2016_01_02", in each sub folder having Same Excel file like "SALES".
in first sub folders Excel fields like
ID,NAME,AGE,SALES
in Second sub folders Excel fields like
ID,NAMES,AGE,SALES
In Two tables one field name is Different.
Here i Want to load Single load statement with two Excels data. With out using( "*" and "&" ) symbols.
is it possible in qlikview?
Regards
Mahesh
Hi Manesh,
Things didn't work out exactly as I'd thought but this script works and I hope it's useful:
Sales:
LOAD * FROM
[LOADING DIFFERENT DATA FROM MULTIPLE SUB FOLDERS\2016_01_02\*.xlsx]
(ooxml, embedded labels, table is Sheet1);
RENAME Field NAMES to NAME;
LOAD * FROM
[LOADING DIFFERENT DATA FROM MULTIPLE SUB FOLDERS\2016_01_01\*.xlsx]
(ooxml, embedded labels, table is Sheet1);
cheers
Andrew
Hi Bro,
Thanks,
But not like that i need to load single load statement with out "* and &" symbol
I think this is related script path
please check this
Maybe use
ALIAS Name AS NAMES;
Before loading your excel files (using a LOAD * FROM ....;)
Or use a
FOR EACH vFile IN FILELIST(...) ... NEXT vFile
loop and create a variable that hold the correct field name based on path. Use this variable in your LOAD statement:
LOAD $(vField),
ID, AGE, SALES
FROM $(vFile);
Hi Mahesh
Does this satisfy ..
for i=1 to 2
if $(i)=1 then
LOAD ID,
NAME,
AGE,
SALES
FROM
(ooxml, embedded labels, table is Sheet1);
else
LOAD ID,
NAMES as NAME,
AGE,
SALES
FROM
(ooxml, embedded labels, table is Sheet1);
ENDIF
Next
Hi Bro,
without "ALIAS name" and "*" , i need to do,
i need total two tables data in single load statement.
Regareds,
Mahesh
Hi Bro,
without "ALIAS name" and "*" , i need to do,
i need total two tables data in single load statement. not two load statements
Regareds,
Mahesh
Hi Experts,
Can any one help me please.
Regards
Maybe we can help you better if you explain what you want to achieve, i.e. why you can't use the suggestions already provided (in other words: explain the restrictions to a possible solution).
Hi Bro.
I have one folder "DATA" in this folder i have two sub folders like "2016_01_01",2016_01_02", in each sub folder having Same Excel file like "SALES".
In first sub folders Excel fields like
ID,NAME,AGE,SALES
in Second sub folders Excel fields like
ID,NAMES,AGE,SALES
In Two tables one field name is Different.
Here i Want to load two tables with Single load statement With out using( "*" and "&" ,"Rename") symbols.
Note:- final thing is i need two tables data in single load statement
Regards
Mahesh
As far as I know, you can't address two tables as input in a single LOAD statement.
You can use a wildcard in the filename (star symbol), but this will translated by QV to repeat the LOAD statement for each filename matching the pattern.
You can also use a FOR loop to iterate over the files, as suggested before.
In both cases, you can write a single LOAD statement in your script, but it will be executed by QV multiple times (depending on number of files matching the search pattern).
Still, writing it only once is helpful to avoid redundancy in your script code.