Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bimanbeginner
Contributor II
Contributor II

Loading Multiple Excel files

Hi

I would like to load multiple excel files based on the date of the file

in my example I would like to load all files greater than '20180506'

Your assistance is appreciated.

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

For each File in FileList('$(Path)\TestFile2018*.xlsx') ;

//For each File in FileList('$(Path)\TestFile'>'20180506*.xlsx') ;  I would like to do something like this but this does not work.

Let vFileName=SubField('$(File)','\',-1);

Let vFileDate=Num(Keepchar('$(vFileName)','0123456789'));

If '$(vFileDate)'>20180506 THEN

Data:

LOAD Field1,

     Field2,

     Field3,

     FileName

FROM $(File)(ooxml, embedded labels, table is Sheet1);

END IF

NEXT;

View solution in original post

2 Replies
sasiparupudi1
Master III
Master III

For each File in FileList('$(Path)\TestFile2018*.xlsx') ;

//For each File in FileList('$(Path)\TestFile'>'20180506*.xlsx') ;  I would like to do something like this but this does not work.

Let vFileName=SubField('$(File)','\',-1);

Let vFileDate=Num(Keepchar('$(vFileName)','0123456789'));

If '$(vFileDate)'>20180506 THEN

Data:

LOAD Field1,

     Field2,

     Field3,

     FileName

FROM $(File)(ooxml, embedded labels, table is Sheet1);

END IF

NEXT;

sunny_talwar

Try this

Let Path='';


For each File in FileList('TestFile2018*.xlsx') ;

IF Date#(Left(Right('$(File)', 13), 8), 'YYYYMMDD') > MakeDate(2018, 5, 7) THEN

Data:

LOAD Field1,

      Field2,

      Field3,

      FileName

FROM $(File)(ooxml, embedded labels, table is Sheet1);

ENDIF;


NEXT;