Use a For Each Row activity to loop through each row of the DataTable,inside the loop, use an If activity to check if the file name matches the desired name. If the file name matches the desired name, use the Assign activity to update the file name by changing the last alphabet letter.
Use the “Excel Application Scope” activity to open the Excel file and use the “Read Range” activity to read the sheet.
To rename the sheet according to the file name, you can use the “Invoke Method” activity and select “worksheet” as the target object. Then choose the method “Rename” and pass the new sheet name as an argument.
worksheet.InvokeMethod(“Rename”, {newSheetName})
To update file name-
Try this-
Use assign activity and take a variable “fileName” of type string and provide value.
fileName= Path.GetFileNameWithoutExtension(filePath)
Use assign activity and take a new variable “newFileName” of type string and provide value