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: 
bhargavikn
Contributor III
Contributor III

Excel with date extension

Hello,

Need a help to resolve the below issue.

We have one excel with an extension of YYYYMM as source for our application.

Example: Excel_201905.

When ever there is an update in excel, the excel will be renamed as Excel_YYYYMM with updated month and year.

Please help me to load the excel automatically, without changing the script every time.

Thanks in advance.

Labels (1)
2 Replies
Vegar
MVP
MVP

You can do this, then you will fetch all excelfiles with the name format 'Excel_XXXXXX.xlsx'

Data:
LOAD
  *
FROM
  [Excel_??????.xlsx] (ooxml, embedded labels);

 

Vegar
MVP
MVP

If you only need to read the current YYYYMM file you can do like this:

LET vL.CurrentYearMonth = date(today(),'YYYYMM');
Data:
LOAD
  *
FROM
  [Excel_$(vL.CurrentYearMonth).xlsx] (ooxml, embedded labels);