Close Excel Application but not by Killing the process. Any Other way?

I Want to close Excel Application, But Not Get All Processes and Kill Just CLOSE the EXCEL application, so is there any way to close the Excel which May be running in Foreground or may be in Background???


Welcome to forums

You can use Close Application activity

Hope this helps you


@Srini84 Actually Close Application needs Ui Element selectors but let say 4 Excel Instances are running and 3 are Active so it will be found in Element Exist and Close Application will close them. BUT what about that 1 remaining Excel Instance which still running in the Main Memory as a background process(ram sticky process)? That o e will not be closed by this Close Application Activity.

Hi @SHIVAM_SHARMA you can use close workbook activity

Have you tested this way:

For Each p in Process.GetProcessesByName("excel")

CloseExcelWindows.xaml (5.6 KB)


Thanks @ptrobot, It works for all Foreground as well as background applications. :blush:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.