Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Loading Different data from multiple folders

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

24 Replies
effinty2112
Master
Master

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

qlikview979
Specialist
Specialist
Author

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

Apply Map in Single line Statement

swuehl
MVP
MVP

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);

kkkumar82
Specialist III
Specialist III

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

qlikview979
Specialist
Specialist
Author

Hi Bro,

without "ALIAS name" and "*" , i need to do,

i need  total  two tables data in single load statement.

Regareds,

Mahesh

qlikview979
Specialist
Specialist
Author

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

qlikview979
Specialist
Specialist
Author

Hi Experts,

Can any one help me please.

Regards

swuehl
MVP
MVP

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).

qlikview979
Specialist
Specialist
Author

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

swuehl
MVP
MVP

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.