Compare two diferent excel´s

Good afternoon,

I am currently trying to make a comparison between 2 Excel’s with data (each Excel has different headers, but the same data, Example: Excel1 → Volume = 1500; Excel2 → VOL = 1500).

To do this, I am using a “For Each” (Write_Cell.png) that contains an “Excel Application Scope” to open a .xls on which I want to write the result of the comparison.

However, in the “Write Cell”, it manages to write in the first cell where I indicate it, but then it jumps an error:

20.4.1 Source: Write Cell
Message: Could not write cell A2.
Exception Type: UiPath.Excel.ExcelException
RemoteException wrapping UiPath.Excel.ExcelException: Could not write cell A2. —> RemoteException wrapping System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel._Workbook.Save()
at UiPath.Excel.WorkbookApplication.SaveWorkbookInternal()
at UiPath.Excel.WorkbookApplication.WriteCell(String cellAddress, String data)
— End of inner exception stack trace —
at UiPath.Excel.Activities.ExcelInteropActivity`1.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)

And I’d like to know if someone can explain to me the fault and why they write to me once and skip the mistake.

Thank you,


The issue was that Excel was running something in the background.

I have suggestion to the workflow apart using excel application scope and condator try below steps.

  1. Before for each use build data table and add required column name in that.
  2. Inside for each use Add datarow (Properties of add datarow: Arrayrow={item},Datatable=Builddatatablevariablename)- This will add each row to the builddatatable.
  3. After for each use Excel application scope write range the builddatatable.

Try to use Excel Workbook