Not sure if anyone has experienced this within RPA automation but whilst developing a dozen of automation’s I have come across problems where the Bot gets hung up on an excel activity but does not fall into a try and catch exception or stop. It continues to run but not processing anything. I am currently using “close workbook” after every excel scope action (not in the scope, just after outside of it) however my question is :
IS THERE ANY RISK to use Kill Excel after every single excel activity?! including a 5 second delay after the activity then Killing it…? or no delay if its possible?
Thank you for your response with this also two more questions
Within my automation some of it was not built by me and I have seen excel activities being used loosely (not inside a excel scope) i.e. “write cells” and “read ranges” questions are below in regards to this :
Would you agree that these activities should always be placed inside a scope?
Would it be dangerous to use kill excel after loose excel activities?
It is not mandatory to keep these activities inside excel scope. For example if you want to save a data table to excel. It is not required to keep inside a scope. But it is recommended to keep the excel actions inside a scope for better way of working. When the excel application scope ends, it automatically closes the file after all the excel action completed. Look at the second point why it is dangerous if you dont use scope.
It is dangerous sometimes. For example if you are saving a file and then you killed the process in between it makes the excel file no use.