Excel Exception: HRESULT: 0x0010108 RPC_E_Disconnected

excel

#1

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


#2

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


#3

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!


#4

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