Then i open the excel which is something like “Report-2018-06-14.xlsx” in the following manner =
“\resources\Report-” + currentDate + “.xlsx”
Which works great if I want to only open today’s report. the problem is the report might come in on a Monday or a Tuesday, so I was thinking of running the bot on a Weds.
as the report can come on a monday or tuesday i need a range of days, ideally like “Today + last 2 days”
I’ve tried
“\resources\Report-” + currentDate (-2) + “.xlsx”
but it didn’t work. I’ve also tried changing the assign & various other ways from google but i just cant seem to get it working.
any ideas? do i have to do the entire process in a differnt way to achieve this?
@Zak_Cooper You can open excel sheet by using “Resources\Report-” + v1 + “.xlsx” this dynamic path but pass this value in assign activity curr_date.AddDays(-2).ToString(“dd-MM-yyyy”)
So my goal is to have uipath open an excel file that has the date in the name,
open excel scope → if file name contains today, yesterday or the day before date → open
Whats happening with your way is it cannot find the file from 2 days ago, so it creates a new file. But i have a fie from yesterday i would like it to find instead.
I wonder if its possible via a for each ? "for each file in X folder if name contains = today.AddDays(-2) then assign name to a variable, then open excel sheet using that variable ?