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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
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
Anil_Babu_Samineni

As per my expereince, That's not possible, Of still you want use Alias name

Why you don't want Alias Name here?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikview979
Specialist
Specialist
Author

Hi Bro ,

This is my script loading data from multiple sub folders(all sheets having same fields)

SUB Scanfolder(Root)

For each FileExtension in 'xlsx'

FOR Each FoundFile in FileList(Root &'\*.'& FileExtension)

T1:

LOAD ID,

    NAMES,

     SAL,

     YEARS

FROM

[$(FoundFile)]

(ooxml, embedded labels, table is Sheet1);

  Next FoundFile 

NEXT FileExtension

For Each SubDirectory in DirList (Root & '\*' ) 

Call ScanFolder(SubDirectory) 

Next SubDirectory 

End Sub 

Call ScanFolder('D:\LOADING DATA FROM MULTIPLE FOLDERS') ;

Now my requirement  little bit change all sheets having different  field names, i want load all sheets data to single load statement. with out using "*" symbol and "Rename" also.


stalwar1swuehlkush141087jagangwassenaar

how can i achieve this

Regards

Mahesh

qlikview979
Specialist
Specialist
Author

Hi Anil,

This is Requirement , with out using "*" and "rename" and  i need to load all sheets data in single load statement like above script.

Regards,

Mahesh

qlikview979
Specialist
Specialist
Author

Hi Experts,

If its possible, can any one help me?

Regards

swuehl
MVP
MVP

Can you elaborate why there are requirements like "with out using "*" and "rename" "?

If you know the structure and names of your tables, have you tried with a for loop that iterates over each file and builds a variable based on the filename, like

SET vField = Name;

resp.

SET vField = Names AS Name;

and then use dollar sign expansion to use this variable in your LOAD?