Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FileList can't solve variable correctly

Hi All,

this code works:

For each File in FileList('C:\T\*.xlsx');

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

this code gives me an error:

SET Tpath = 'C:\T\*.xlsx';

For each File in FileList($(Tpath));

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

Untitled.jpg

any suggestion?

thanks!

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

For each File in FileList('$(Tpath)');

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

4 Replies
sunny_talwar

May be use directory loop instead of filelist to do this

Create a QlikView File Loop to Load all Files

Also, look at example number 2 here:

For each..next ‒ QlikView

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

For each File in FileList('$(Tpath)');

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
joydipp1988
Creator
Creator

Hi @lmiceli.amsterdam

I believe the code posted by Kaushik can solve your problem. You need to provide the variable inside single inverted i.e. FileList('$(Tpath)').

So if your problem is solved, please marked the answer as "Correct Answer".

Thnaks,

Joy

Not applicable
Author

Thank you!