The Duplicate Sheet activity does not raise an error even when the specified sheet to duplicate does not exist

Issue Description: While utilizing the Duplicate Sheet activity within UiPath.Excel.Activities, the robot proceeds with execution even when the specified sheet name in the “Sheet to Duplicate” property is invalid.
Current Behavior: If the source sheet is absent, the activity generates a blank sheet with the same name and subsequently duplicates 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)
Then
Rename Sheet
Log Message: “Sheet renamed successfully.”
Else
Throw: BusinessRuleException (“The specified sheet does not exist.”)
End If

Regards

Hi @vrdabberu ,

I’m not seeking a solution to check for sheet existence and raise an exception. 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.

1 Like

Hi @shivagowdavarad ,

Thank you for sharing this, we’re tracking this as an improvement to the current behavior and added this as an insight.

Many thanks,
Raluca

1 Like