Thank you for your continued support.
I would like to ask for your guidance regarding the “Rename Sheet” activity. Is it only usable within activities that involve an Excel file?
There are robots that only use the application scope, but it is quite cumbersome to change to an Excel file activity just for that. If there is a way to rename the sheet without using an Excel file activity, I would appreciate your advice.
I would like to ask, is the “Rename Sheet” activity only usable within activities that use an Excel file?
I think that’s correct.
As a solution, I suggest replacing the Excel Application Scope with the Excel File Use activity (Excel Process Scope).
(The activities under the Excel Application Scope will also work under the Excel File Use activity.)
Hello @Teo
Yes, the Rename Sheet activity from the Modern Excel activities requires a Use Excel File resource container to work properly.
If you prefer using Excel Application Scope Classic, you can rename a sheet directly using VBA/Macros or an Invoke Code activity without switching your whole process over to Modern activities
Hi @Teo ,
If the file is an Excel workbook, using Excel/Workbook activities is the best practice for sheet renaming rather than UI automation, as it is more stable and maintainable.
Yes, Rename Sheet activity works within the Excel-related activities/scope because it needs an Excel workbook context.
If your robot is using only Application Scope, you can use Excel Process Scope / Use Excel File and then use Rename Sheet inside it.
Alternatively, if you don’t want to use the Excel activity, you can rename the sheet using Invoke Code with the Excel Interop API, but this is more complex and generally not recommended.
You can probably use Use Excel File activity, just only for renaming the sheet instead of disturbing the entire flow. This is nesting inside your existing Excel Application Scope activity for renaming the sheet.
Else, if you don’t want to use the Excel File activity, you can also try out Invoke Code or Execute Macros.