Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSensor
Partner - Creator
Partner - Creator

Read all Files from a directory

Hi, I saw several solutions here in the forum but they didn't work. I want to read several files in a directory but it don't works:

 

for each file in filelist('lib://myPath/Archive\*.xlsx')

LOAD
ID,
Title
FROM [$(file)] (ooxml, embedded labels, table is default_1)

NEXT file

Labels (1)
4 Replies
vincent_ardiet_
Specialist
Specialist

This should work.
Are you able to load one the file of this path, like?

LOAD
ID,
Title
FROM [lib://myPath/Archive\onefileofthefolder.xlsx] (ooxml, embedded labels, table is default_1)

MeehyeOh
Partner - Creator
Partner - Creator

Hi, @QlikSensor 

Is the file directory path you want to connect to valid?

And does every Excel file have a default_1 worksheet?

Reply! thanks!

 

QlikSensor
Partner - Creator
Partner - Creator
Author

Yes, the directory is correct. I loaded just one file manually via the menu and then adapted the script.

vincent_ardiet_
Specialist
Specialist

When you say this doesn't work, do you have any error messages? Could you check if Qlik is entering in the loop using Trace for example?