<Update> Thought I would be clever by trying to copy the excel files to the local drive first, but the issue STILL persists. The Launch Excel Action seems to just be wildly broken right now. I had Excel based PAD unattended flows running fine until last week when they suddenly started having an error with the UIFlows Agent. Reinstalling PAD on the computer fixed that issue, so this is the newest February release of PAD now which is having the issue.
Also I will note that it doesn't actually fail 100% of the time in test runs, sometimes it will open the Excel file and carry on correctly, but it "fails" far more often than not. The computer PAD is on is running Excel 2013 32 Bit.
I am opening Excel files from a network location, and it is coming up with an error that it "failed" to load the file, when the file did actually open and load just fine.
My guess is the delay caused by opening the file over the network is causing it to assume it failed.
Unfortunately I can't find a good way to get around this false error. The "retry on error" option causes it to open the file again, which is very not what I want. If I tell it to ignore the error and move on, it seems like the ExcelInstance variable doesn't correctly get assigned in this case. I even tried to use a wait for window and get window to capture the Excel instance manually, but it seems I cannot use the Run Excel Macro action on anything that was not setup with the Launch Excel action.
So my understanding is you cannot run Excel related actions without setting a variable from the Launch Excel Action, and the Launch Excel Action does not seem to have any meaningful ways to compensate for false "errors" that may occur.
Added full error paste.
Robin.Core.ActionException: Failed to open Excel document '(Active workbook retrieval error.)' \\filepath\filename.xlsm. ---> System.Runtime.InteropServices.COMException: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object args, Boolean byrefModifiers, Int32 culture, String namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object providedArgs, ParameterModifier modifiers, CultureInfo culture, String namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object args, CultureInfo culture) at Robin.Modules.Excel.Actions.ExcelActions.GetItem(Object o, Int32 ordinal) at Robin.Modules.Excel.Actions.ExcelActions.LaunchExcel(Variant documentPath, Variant varPassword, Variant& excelInstance, Int32 launchMode, Boolean visible, Boolean loadAddInsAndMacros, Boolean needsAuthentication, Boolean readOnly) --- End of inner exception stack trace --- at Robin.Modules.Excel.Actions.LaunchExcel.Execute(ActionContext context) at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)
The version this issue was occurring in was 22.214.171.12436, which was installed on Monday. I wondered if the big announced release of PAD as "free for all Windows 10 users" on Tuesday may also have been a new release, so I reinstalled it again today and it was a newer version. This issue is not occurring on the version that was installed today, which is 126.96.36.19956 .
Well, this seems to be much less of an issue now at least, but it is still happening on occasion. Thinking about a solution where when the Launch Excel action "fails", it will go look for the Excel window and close it, and then try again. At least if the issue is random now, it should succeed eventually like this.
Setting up an error catch with the "On Block Error" and checking for an open Excel Window at the start seems to work in tests (where I have watched the Launch Excel action fail and it looped back and worked on a retry).
Did include a delay after closing the window because it seemed like not doing so might result in an infinite failure loop (only let it loop a few times before stopping it, not sure if the lack of delay was why it kept failing).
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!