Excel Exception: HRESULT: 0x0010108 RPC_E_Disconnected

Hello UiPath Community,

I have been using the UiPath Studio software only for a couple weeks now.
Thanks to this forum and the offical guides, I have been able to figure out most the problems I have run into.

Im trying to read Data out of a Cell in a Excel Spreadsheet and I’m getting the following error code.

test has thrown an exception

Source: Read Cell

Message: Das aufgerufene Objekt wurde von den Clients getrennt. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))

Exception Type: ExcelException

UiPath.Excel.ExcelException: Das aufgerufene Objekt wurde von den Clients getrennt. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED)) —> System.Runtime.InteropServices.COMException: Das aufgerufene Objekt wurde von den Clients getrennt. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))
at Microsoft.Office.Interop.Excel._Workbook.get_Sheets()
at UiPath.Excel.WorkbookApplication.SetSheet(String sheetName, Boolean createNew)
— End of inner exception stack trace —
at UiPath.Excel.WorkbookApplication.SetSheet(String sheetName, Boolean createNew)
at UiPath.Excel.Activities.ExcelInteropActivity`1.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Thanks for your help in advance, it will be greatly appreciated.

Niklas

1 Like

Just to be sure, the excel sheet you are trying to access is closed ?

Well I use the ‘read cell’ function various times in my workflow, and have it set to “invisibile” mode. As far as I cant tell the spreadsheet gets closed after reading the necessary cell.

Edit: If I run the workflow in the slow debug mode the error doesnt happen!

1 Like

Open any Excel file → and than close all open workbooks. Also check in processes there are not excel.exe processes running.

I just had the same error ; gave a delay of 1 second (00:00:01) ,before proceeding to Excel application scope activity and it worked fine :-)…

4 Likes

I gave a delay of 1 sec and the error is no more displayed. Thank you so much

1 Like

Thank you it really worked for me.

Use the same option and it works, but had to put 3 delays to make sure. :smiley:

UiPath.Studio_dFqzqJJZFz