Multiple errors :Exception Type: System.Runtime.InteropServices.COMException

Hi,

I am doing the below steps in one of the excels.

  1. Open Excel application scope
  2. Execute macro
  3. Save workbook
  4. Do some operations in web browser
  5. Pass the WBapplication argument to another Xaml
  6. Open Excel application scope with the WBapplication argument

Error encountered

18.4.3+Branch.master.Sha.9888b477be8d3ec8a832306fc59c34ba6edad108

Message: Microsoft Excel cannot access the file ‘\FileName .xls’'. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

Exception Type: System.Runtime.InteropServices.COMException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Runtime.InteropServices.COMException: Microsoft Excel cannot access the file ‘FileName .xls’'. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
** at UiPath.Executor.WorkflowRunner.EndExecute(IAsyncResult result) in D:\a\1\s\Robot\UiPath.Executor\WorkflowRuntime.cs:line 208**
** at UiPath.Core.Activities.InvokeWorkflowFile.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)**
** at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)**
** at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)**

Has anybody faced this earlier? Below are the screenshots

It has already opened the excel. However it says file cannot be found error message in Excel.

error

Are you closing the workbook you opened using excel application scope? May be the same is running in the background. Please check in the task manager @SudhakarAs92

If it is, then use kill process to close that and then use it in another workflow