Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

looping through folder file

Dear all,

is it possible to loop through a folder and choose only the tables with a certain prefix name ?

for example, I would consider only the table with BUFFER_ as prefix name

Help please !1

Thanks in advance

1 Solution

Accepted Solutions
its_anandrjs

Load your script some thing like in location type like this BUFFER_*.xlsx if file name start with this only. By this all your tables load and concatenate with each other and make single table also if field name are same.

LOAD FieldName,

  FileBaseName() as FileName 

FROM

(ooxml, embedded labels, table is Sheet1);

Hope this helps

Thanks & Regards

View solution in original post

4 Replies
its_anandrjs

Load your script some thing like in location type like this BUFFER_*.xlsx if file name start with this only. By this all your tables load and concatenate with each other and make single table also if field name are same.

LOAD FieldName,

  FileBaseName() as FileName 

FROM

(ooxml, embedded labels, table is Sheet1);

Hope this helps

Thanks & Regards

maxgro
MVP
MVP

Directory;

FOR Each File in filelist ('.\BUFFER_*.xlsx')

  LOAD *

  FROM

  '$(File)'

  (ooxml, no labels, table is Sheet1);

NEXT File;

or

Directory;

LOAD *

FROM

BUFFER_*.xlsx

(ooxml, no labels, table is Sheet1);

Anonymous
Not applicable
Author

Thanks very much!!

Anonymous
Not applicable
Author

Thanks very much for your help