Hello, in my UiPath sequence, after downloading an Excel file, as a next step I would like to open it. However the name of the excel file will be changed every time the process works so I need to open this file by Assign activity. However it gives error and I cannot move on with my sequence. I would be very appreciated if you could help me about this issue. In the attached image you could find the error I am getting.
The assign activity code is:
Directory.GetFiles(“C:\Users\zny\Downloads”).Select(Function(f) New FileInfo(f)).OrderByDescending(Function(b) b.LastWriteTime).ToList(0).ToString
Hello, thank you very much for your rapid reply. I created NewestFile as variable of Arguments. But the main part in this error message is “Non-invocable member” thing I guess… Is it something related to packages like System.IO?
Thank you very very much, this solved the problem!
Finally I also would like to ask you that, this Excel file which will be downloaded is 97-2003 worksheet, so it always gives notification window as “Unless you trust it source… and Do you want to open it anyway?” before opening, which UiPath needs to click “Yes”.
How can I write this command in UiPath because it cannot perceive the Excel file as it isn’t open yet unless clicking “Yes”?
Thank you very much! As I’m a beginner, I couldn’t go on with more advanced activities and I handled it with keyboard shortcuts as I realized that the file only needed to press left and enter to be able to open and it worked as well…
Again many thanks for your interest and help,