I want to change a sheet name from a downloaded Excel file
So I use the activity For each Excel sheet and rename sheet but nothing happens the program compiles but the name never change
HI @Juandix
Welcome to uipath community
Try like this in the From → Excel.Sheet("Olde Sheet name")
Regards
Gokul
You have csv for “In workbook” - is the file actually an Excel file (.xlsx), or a CSV file?
He doesn’t need to do Excel.Sheet(“Olde Sheet name”) because he is using For Each Excel Sheet which gives him the sheet as an ISheetRef variable.
Also install BalaReva.Excel.Activities package it make Excel automation very easy to use.
The UiPath Excel activities have everything needed to rename a sheet. Third party packages aren’t necessary to solve this.
I just did this and it worked fine. Do you have “Save changes” checked for your Use Excel File activity?
“Olde sheet name” isn’t going to work unless you have an actual sheet named “Olde sheet name”.
You don’t have to use that expression. CurrentSheet is what you want in the From.
I notice that so I use CurrentSheet also I try with Excel.Sheet(CurrentSheet.Name) But is not working either
I already try that, I am downloading a file wich sheet names change “Only one sheet per file”, so I want to put a define name for those files downloaded
Is it actually an Excel file (.xlsx) or is it a CSV?
Its a CSV but i am working it on excel, the program is taking the name from the sheet because I already print it
CSV files don’t have sheets so there is nothing to change.
Noted
That’s the filename. That’s how Excel shows when you open a CSV file, but it’s still just a CSV file which is really just a text file. There are no sheets in a CSV.
Oh yeah you are right I am sorry I am new using this
CSV files are just text files. There are no sheets. Only actual Excel files have sheets. When you open a CSV in Excel it shows the filename as the sheet name just because the Excel interface has to have something there.
You shouldn’t be using Excel activities to work with a CSV file anyway. Use the CSV activities.