I am trying to create a bot that will download an .xls file with a dynamic ID from the internet and then open that file in Excel, but am getting the error I mentioned in the title. I am using an input dialog to input the file pathway where my download is sent (C:\Users\willl\Desktop\RPA\BotAThon), assigning this input to the “DownloadLocation” variable. From there, I am trying to assign a variable to my most recently downloaded file in the folder with the following:
“RecentFile” = String.Join(“”, Directory.GetFiles(DownloadLocation,”*xls”,SearchOption.AllDirectories).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1) )
When specifying the file pathway in the Excel application scope, I am entering “DownloadLocation + RecentFile” and getting this error. What am I doing wrong?
I am new to UIPath, so I apologize if this is a stupid question.