How to open the file I just downloaded


My automation clicks a link that downloads an excel file. This excel file is saved in the /download folder. Now my question is: I would like the StudioX to open the file it just downloaded and filter it. How do I do that? W

1 Like

You can make changes to the chrome settings

Chrome > Settings > Download - Elements for “Ask where to save each file before downloading

once you will enable this it will ask you the file path to save it and by using that path you can access that file easily.

yes but that is not what I mean.

My studioX automation must automaticaly: download an excel file from a website, open it, make some changes, and save it. and I’m stuck with “open it”.

The problem is that I don’t know what name this file will have, all I know that it will be the last downloaded file in the /downloads folder

Hi @marcin.chowaniec ,

Use Excel File activity inside Excel Process Scope and make show excel window property of Excel Process Scope activity to True.

Hope it helps.

Hi @marcin.chowaniec ,

Directory.GetFiles(yourfolder_path,“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Use this in file path.

Download folder :

yourfolder_path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\Downloads"

Final path:

Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\Downloads",“*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Hope this helps.


But how do I point in the StudioX that I want this to be done on the last downloaded excel file? The point is that the automation downloads the file and I will not know what name will it have so I cannot put a path to the file in “Excel file” window.

Hi @marcin.chowaniec ,

ForumSolution.xaml (7.1 KB)

Have a look at the xaml file. I have implemented the same code given by @Harshith_Adyanthaya . Let me know if it solve your issue.


Thank you very much.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.