Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help in Loading files

Hi All,

I have a variable which contains the file name as 'MM YYYY ABC Test_xyz.xls'.

The actual file name is 01 2015 ABC Test_xyz.xls.

There is a folder which contains many files with different filenames.

I have to load only those files from a folder whose file name matches with the pattern 'MM YYYY ABC Test_xyz.xls'.

MM YYYY may change depending on the year and month values.

Can someone please help me?

Thanks,

Asma

5 Replies
Not applicable
Author

Use wildcard in the place of MM YYYY .

You can try like this:

Table1:
LOAD Field1,
           Field2

FROM
[Travel pjt\?? ???? ABC Test_xyz.xlsx]
(
ooxml, embedded labels, table is Sheet1);

robert_mika
Master III
Master III

Try

FOR Each File in filelist ('Files\*ABC Test_xyz.xlsx')

  LOAD A,B

  FROM

  '$(File)'

  (ooxml, embedded labels, table is Sheet1);

NEXT File;

Not applicable
Author

Thanks for the reply

But using * didn't work.

robert_mika
Master III
Master III

Are you getting any errors?

Is the difference in pattern always MM YYYY?

maxgro
MVP
MVP

LOAD

     *

FROM

[?? ???? ABC*.xlsx]

(ooxml, embedded labels, table is Sheet1);