Hey everyone, I am trying to use the “Delete Column” activity to remove column E from within my file - all works well but the problem is the sheet name will change week to week.
So currently, in my “Source” I have the sheet name
File.Sheet(“ServiceUserReport_20211115”)
This is the only tab in the workbook, but it will change its name week to week. I tried and failed adding an aterix as below. Any help most welcome
If the sheet name will regularly change, create a variable for it as an input argument, that way in UiPath Assistant you can write the Sheet name before the program is ran.
Trying using a variable for creating the name of the sheet dynamically.
Use an assign activity
SheetName(Variable Name)
For the value - “ServiceUserReport_” + now.AddDays(x).ToString(“yyyyMMdd”)
Note : instead of x replace with number of days you wanted to add -7 will give date fom last week and 7 will give date from next week, change the number according to your need.
What I meant was after the column name, sometimes people create whitespaces by accident.
Could you send a picture of your full Excel sequence?
If the error is still persisting, I am not sure what the problem is. The only thing I can suggest is reading the excel sheet into memory, deleting the Data Column and then rewriting to the Excel sheet.