The Rename Sheet activity does not raise an error even when the specified sheet to rename does not exist

Issue Description: While utilizing the Rename Sheet activity within UiPath.Excel.Activities, the robot proceeds with execution even when the specified sheet name in the “From” property is invalid.
Current Behavior: If the source sheet is absent, the activity generates a blank sheet with the same name and subsequently renames it.
Expected Behavior: If the source sheet is missing, the activity should raise an error indicating that the specified sheet does not exist.

Hi @shivagowdavarad

Excel Application Scope
Get Workbook Sheets
If (sourceSheetName exists in sheetNames)
Rename Sheet
Log Message: “Sheet renamed successfully.”
Else
Throw: BusinessRuleException (“The specified sheet does not exist.”)

Regards

Hi @vrdabberu ,

I’m not seeking for a solution, Instead, I’ve identified a behavior in the activity that deviates from the expected behavior, and I’ve highlighted it as a bug. This way, if others also find this behavior unexpected, they can submit their votes, and the activity might be updated in the upcoming updates.

2 Likes

Hi,

Agree with you, bot should throw exception if sheet is missing.

1 Like

Hi @shivagowdavarad ,

Thank you for sharing this feedback. Similar to The Duplicate Sheet activity does not raise an error even when the specified sheet to duplicate does not exist - Feedback / Activities - UiPath Community Forum, we’ve added this as an insight.

Many thanks,
Raluca

1 Like