Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading excels when date matches

Hi,

I have two variables vMaxDate and vMinDate which has Max and min dates respectively.

For this particular dates the excel files should dynamically load.

For the excel files date field needs to be taken from filepath.

Any help on this?

7 Replies
Anil_Babu_Samineni

Seems, i am not clear. Where and what you want to update with dates from that variables?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jonathandienst
Partner - Champion III
Partner - Champion III

You will need to fill in the blanks as you have not provided very much to go on, but this is the general pattern:

For Each vFile in FileList('... the file path and filelist mask ...')

    Let vDate = ... parse date from vFile ...;

    If vDate >= vMinDate And vDate <= vMaxDate Then

          LOAD ....;

    End If

Next

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

I'am calculating min and max variables from qvd, only for those dates I want to load excel files from a folder.

Anonymous
Not applicable
Author

This will load all excels for all dates but I need only for vMaxDate and vMinDate and not for in between dates

vishalarote
Partner - Creator II
Partner - Creator II

load  *,

from 'C/Filepath/*.qvd'

where Date>=Mindate and Date<=Maxdate;

jyothish8807
Master II
Master II

Hi Aparna,

Once solution could be if you can populate the date on the file name, so qlikview can identify the file using the file name. Else you have to load all the files and then exclude the unwanted one based on the Date field inside the file.

Br,

KC

Best Regards,
KC
jonathandienst
Partner - Champion III
Partner - Champion III

>>This will load all excels for all dates but I need only for vMaxDate and vMinDate and not for in between dates


Then just modify the If statement accordingly:

     If vDate = vMinDate Or vDate = vMaxDate Then

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein