How to rename an Excel Workbook (the entire Workbook not a sheet inside it)

Hi, I’m trying to rename my Excel Workbook (not a sheet but the entire excel file) without opening it and performing it manually (click on the save as button, inserting the path and the name…) but I really don’t find the way to do it. I’ve searched on forum but I only see posts to rename a sheet, to change the format, to create a new workbook…but anything to rename the current excel file.

I need to rename it with a variable name (my variable is a string that changes the project code, example: M1212060-START, R34469734-START or C2064997-START).

I’ve tried using the “Output” option on the excel application scope but it indicates that I can’t convert from string to object or something like this.

Any idea?

@Airun You can use Move File/Copy File Activity to Rename to the name you want and then Delete the Source File using Delete Activity


@Airun Or you can just use Move File Activity :sweat_smile:

Okey! I was focused trying to find a kind of “Save as” activity for excel, I don’t thinked about this option!! Thank you very much @supermanPunch and thanks for the fast answer!!! I will try it immediatelly! :grin:


I’m testing it, finally I’ve taked the “Copy file” activity and it seems it must work fine but, I’m not sure why (I must be doing something wrong) it indicates me that it don’t finds the “from” file. It’s strange because I have an excel application scope just before that is finding it without any issue, the path is: “C:\temp\ToUploadDocsToAgresso” + OriginalExcelName

I add screenshots:

@Airun But the Filename doesn’t have extension according to the error, Can you cross check it ?
Also keep a Backup of the File before using it, and you can do the operation using Move file Activity, No need of Copy File just want to rename

The filename should have the extension .xlsx at the end

1 Like

Yes, that’s it! It works perfectly now, all the process has been executed without errors!! :smiley:
Thank you very much!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.