Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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!

Tags (1)
1 Solution

Accepted Solutions

Re: FileList can't solve variable correctly

Hi,

Try this.

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

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

Regards,

Kaushik Solanki

4 Replies
MVP
MVP

Re: FileList can't solve variable correctly

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

Re: FileList can't solve variable correctly

Hi,

Try this.

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

LOAD Field

FROM

[$(File)]

(ooxml, embedded labels, table is Sheet1);

next File;

Regards,

Kaushik Solanki

joydipp1988
Contributor

Re: FileList can't solve variable correctly

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

Re: FileList can't solve variable correctly

Thank you!