Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
david_ze
Partner - Contributor III
Partner - Contributor III

loading multiple excel files

Hi All, I'm loading mutiple excel files with the same tables by using the script below:

For each ExcelFile in filelist ('*.xls')

My_data:

Load * From $(ExcelFile) (biff, embedded labels, header is 1 lines, table is Sheet1$);

Next ExcelFile;

The result of the reload is that Qlikview creates synthetic keys for each filed multiple by the number of files.
I'll appreciate your advice on how to avoid the synthetic keys.
Regards
David

3 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Assuming all files are the same and that each file only contains one of each field name (ie no duplicate field names) then:

My_Data:

LOAD

  *

FROM  C:\<path>\*xls...;

That should work.

Hope this helps,

Jason

danielrozental
Master II
Master II

Try something like

My_data:

Load null() as somefield

autogenerate(0);

For each ExcelFile in filelist ('*.xls')

concatenate(My_data)

Load * From $(ExcelFile) (biff, embedded labels, header is 1 lines, table is Sheet1$);

Next ExcelFile;

drop field somefield;

david_ze
Partner - Contributor III
Partner - Contributor III
Author

Thanks Daniel it works fine...
David