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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
My_Rebecca
Creator
Creator

How to load the data of latest date, then rename the sheet with latest data?

How to load the data of latest date, then rename the sheet with latest data?

Datasource:

My_Rebecca_0-1679360620498.png

currently I need the data of "DC TJ Inventory_20230319",

Load

******

FROM [DC TJ Inventory_*.XLSX]
(ooxml, embedded labels, table is Sheet1)
Where max(TextBetween(FileName(),'_','.') )

But this does not work. How to script this?

Then I need to rename the sheet like this, how to realize it? Many thanks.

My_Rebecca_1-1679360837880.png

 

 

 

Labels (2)
12 Replies
MayilVahanan

Hi

After the below statement, can you please add "Trace" statement.
let vMaxFileName=Peek('FileNameDate');
Trace vMaxFileName: $(vMaxFileName);


To find the values in the variable

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

Sorry, the same error happens again......

I'm going crazy.

My_Rebecca
Creator
Creator
Author

From my knowledge, I think following script is feasible, but yet not succeed.

Is it possible to make it simple and easy? thanks.

My_Rebecca_0-1680166658290.png