web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Unable to close excel

(0) ShareShare
ReportReport
Posted on by 61

I am opening an excel file lets call it "ABC" file from a specific folder location , then clicking on file , save as adobe pdf, then clicking on convert to pdf and saving it. after that I the excel file - "ABC" is still open. So i used the same excel instance that i used while opening it and gave the command close excel. Its throwing an error saying cannot close, I tried closing with send keys as well it still doesnt close. Can someone please help with this? 

 

please find the error details as below: 

 

Correlation Id: 3b0d2e9e-b99c-4db0-94b1-c76ad4972a54

 

The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED)): Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Failed to close Excel instance. ---> System.Runtime.InteropServices.COMException: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))

   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 Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.InvokeMethod(Object o, String methodName, Object[] methodArgs)

   at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.CloseExcel(Variant excelInstance, Variant documentPath, Int32 save, Int32 saveAsFormat, String xmlMapName)

   --- End of inner exception stack trace ---

   at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.CloseExcel.Execute(ActionContext context)

   at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

I have the same question (0)
  • WillSG Profile Picture
    352 Moderator on at

    Hi @Sh99  I hope you are doing well.

     

    You can use the Action Attached to Excel and re attached the file with the Excel Instance prior to close the Excel Files, I have seen this issue in the past in which somehow the Instance get lost, so try it in that way and let me know.

     

    Hope this helps,


    If I have addressed your inquiry successfully, kindly consider marking my response as the preferred solution. If you found my assistance helpful, a 'Thumbs Up' would be greatly appreciated.

     

    Additionally, I offer specialized consultancy and development services leveraging PAD. If you're interested in exploring these services further, feel free to DM me, and we can initiate a discussion.

     

    Kind regards,

     

    Will SG

    Managing Director & Automation Lead

    RAMS CR (Recruitment & Automation)

    LinkedIn Profile

  • Sh99 Profile Picture
    61 on at

    I changed the code a bit and just added a vbscript to perform those tasks. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard