cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Wedge
Advocate I
Advocate I

Power Automate Desktop Launch Excel Action "Fails" When It Works Correctly

<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)

 

 

5 REPLIES 5
RaashiSen
Community Support
Community Support

Hello @Wedge ,

Thank you for reporting this and providing in detail. We'll check on our side to confirm this too and update here

Wedge
Advocate I
Advocate I

The version this issue was occurring in was 2.4.78.21036, 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 2.5.39.21056 .

Wedge
Advocate I
Advocate I

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.

Wedge
Advocate I
Advocate I

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). 

Wedge_0-1615594084237.png

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).

Saamir
New Member

Hi,

 

Did you check if you are trying to open two excel files with the same name?

 

Regards,

SA

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,482)