Excel Automation retry logic & best practices

danminter

New Member
Hi,

I wanted to see if you all had any insight to help me with this excel automation that I'm working on. Essentially I'm trying to open two workbooks and run some macros and then save the workbooks. There are three aspects of the automation that I have questions on and I would appreciate any response.

The first question is regarding retry logic on opening the workbooks, I attached an image of the opening workbooks stage. So, I've tested my retry logic using two different file paths and gotten different results. The first result was using a file path on my computer and using the retry logic this way, if the workbooks were already open it would open new workbooks with the same name and then complete the actions. I guess that kind of works. If the folder that is being opened has the file path connected to the cloud using with OneDrive, when I have two open workbooks then the process won't close excel at all due to excel giving a pop-up saying that the workbook is busy. I read that there are other ways to close excel like global send keys alt f4 etc. but is retry logic on this page even really that necessary?

Secondly, I was curious how to maintain an automation that is running several macros. In the following page I run 7 macros in a row, but if one fails then the process terminates and it's not obvious which one fails. So would the best practice be to just label an exception depending on which one fails? Should I be running this stage in object studio with waits?

Thirdly, I'm curious if my automation is even properly formed because it's all using process studio and there is no part done in object studio. My logic is that not much of this automation is reusable for other ones so that it doesn't need the object component but that logic may be flawed as well.

I appreciate any insight/tips into this automation that I'm working on, still fresh to Blue Prism and I'm looking forward to contributing to this community..
 

Attachments

  • Retry logic opening excel.PNG
    47.7 KB · Views: 33
Top