Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

loop to load multiple excel sheets

Hi! 

I have a folder on my computer, "Liefermenge," and in it, a folder "Quote." In the quote folder is a number of  different files, but I would like to create a loop to load only the ones that start with 0021... (ex. 0021_201901.xlsx, 0012_201902.xlsx, and so on). 

How would I go about doing this? I have read the questions similar to this, but I don't understand how to make a loop that selectively loads files from a folder.

I can't share any files, as I am working with Qlikview desktop.

Thanks in advance!

Labels (7)
2 Solutions

Accepted Solutions
Highlighted
Partner
Partner

 

Data:
LOAD Field1, Field2, Measure1, Measure2 FROM [..\Quote\0012*.xlsx] (ooxml, embedded labels, table is Sheet1);
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted
Partner
Partner

In the from clause at the end. So...

table1:
Load
Field 1,
Field2
Etc
>From path\0021*.xlsx;

View solution in original post

6 Replies
Highlighted
Partner
Partner

The absolute easiest way to accomplish this is to fetch QlikView component library and use the qvc.listfiles SUB.

https://github.com/RobWunderlich/Qlikview-Components
Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Partner
Partner

Are the field names the same in each? if so, can't you just use a wildcard?

eg

 

From 0021*.xlsx

Highlighted
Contributor II
Contributor II

Yes, all the field names are the same. 

Where would I put this statement? 

Highlighted
Partner
Partner

 

Data:
LOAD Field1, Field2, Measure1, Measure2 FROM [..\Quote\0012*.xlsx] (ooxml, embedded labels, table is Sheet1);
Plees ekskuse my Swenglish and or Norweglish spelling misstakes

View solution in original post

Highlighted
Partner
Partner

In the from clause at the end. So...

table1:
Load
Field 1,
Field2
Etc
>From path\0021*.xlsx;

View solution in original post

Highlighted
Contributor II
Contributor II

Thank you!!!