Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
HAmzehAF
Partner - Creator
Partner - Creator

load table name keeps changing

hello, 

i wanna load from excel but the name of the excel keeps changing, i want a way for qlik to take the last date excel and load it cuz im doing a history for this qvd that im saving the daily sales from this excel 

any ideas on how to do it ?

2 Replies
MayilVahanan

Hi

Try like below

Solved: Load the latest file of a folder - Qlik Community - 192461

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Cascader
Creator
Creator

try this:

LET vFolderPath = 'C:\Your\Excel\Directory\';

TempFileList:

LOAD FileName() as FileName, FileTime() as FileTime FROM [$(vFolderPath)*.xlsx]

(ooxml, no labels, table is [Sheet1]);

LET vLatestFile = Peek('FileName', 0, 'TempFileList');

LOAD * FROM [$(vFolderPath)$(vLatestFile)] (ooxml, embedded labels, table is [Sheet1]);