Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
suraj_qlikdev
Contributor III
Contributor III

Dynamically load the max Jan file from a bunch of excel files

Hello swuehl‌, sunny‌,

Firstly thanks for all the help and support that you guys are providing on the qlik community. I regularly follow all your solutions you guys post to help other community members.

I would really appreciate if you could also help me with this issue/requirement.

I get one excel file every month from the business user and the file is named as YYYY MMM.

But I only want to load the latest Jan file for one of my dashboard.

Can you please help me with this requirement.

A sample code is greatly appreciated.

Note: I have attached some sample excel files.

Regards,

Suraj

17 Replies
Not applicable

Give the full server UNC path in relative path place.

First get the main folder and search for the file in the all the sub folders. Based on file time or file name & get the latest file name and load the data from in that file.

suraj_qlikdev
Contributor III
Contributor III
Author

Hi Sunny,

I know you are trying hard to help me out but due to some reason its still not working.

Say my source files are at this location : C:\Working Folder\Source\Community_201190\New folder

Whereas my application is here: C:\Working Folder\PPWC MC

Now what should I give before $(vFile)?

sunny_talwar

Try this:

..\Community_201190\New Folder\$(vFile).xlsx

suraj_qlikdev
Contributor III
Contributor III
Author

It says :

Cannot open file 'C:\Working Folder\Community_201190\New folder\2016 Jan.xlsx' The system cannot find the path specified.

sunny_talwar

Did you unzip the file and run the app? You should not have to change anything in the app to run it.

suraj_qlikdev
Contributor III
Contributor III
Author

Sunny,

The issue is resolved and the issue was with relative path:

I gave my path as:

Let vFilePath = '\\utslcqlikviewfs\QlikviewData\PPWC Forecasting\PPWC Forecasts Versions\Forecast versions\Updated Forecast Versions\';

It should have been

Let vFilePath = '\\utslcqlikviewfs\QlikviewData\PPWC Forecasting\PPWC Forecasts Versions\Forecast versions\Updated Forecast Versions';

The system was throwing error because of the backslash.

Thanks for your time and patience.

Regards,

Suraj

sunny_talwar

Still no luck?

suraj_qlikdev
Contributor III
Contributor III
Author

No Sunny.. The issue is resolved, actually the issue was with the backslash in the relative path as I mentioned in the earlier reply. Thanks a ton Sunny, sincerely appreciate your help.