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

Announcements
Solving the Informatica Dilemma: On-Demand Briefing - Watch On Demand!
cancel
Showing results for 
Search instead for 
Did you mean: 
schneider2037
Creator
Creator

LOAD only most current Excel file from list of files

All:
Have a data source that is a daily feed of an XLSX whereby the filename is listed with an epoch suffix. I need to somehow load on a daily basis the file with the max of the epoch timestamp. Can't rely on a date stamp because sometimes the files are delayed and come over as a day late.

Figure if I can get to a max of the epoch time, and load ONLY the file that corresponds to that value, then that should resolve any issues with delayed reporting or having to manually change the filename daily.

Filename examples:

Service_Issue_Calls-Past7days_1528023666940 <--(most current file, the only one I want to load "today")

Service_Issue_Calls-Past7days_1527967390521

Service_Issue_Calls-Past7days_1527967370343

Service_Issue_Calls-Past7days_1527764450215

and so on...

I know I need to create a pathway variable and a filename variable, combined into the LOAD string somewhere, but SUPER new to QV still, and while I've read as many samples online as I can, still struggling. Any suggestions?

Thanks,

Jonathan

11 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

My mistake, i think you need

Let vMax = RangeMax(vMax, num(Right(subField(vFile, '.', 1), 13)));

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

Jonathan - fantastic! Works like a CHAMP!