Unexpected identifier

excel
exception

#1

Hi,

I am trying to read an Excel-sheet with the Read Range activity, but the bot crashes with the error message “Unexpected identifier”. What is the background for this error, and how can I fix it? The problem only occurs for some specific files, and I am able to read all other Excel files than these.

Error message:

Message: Unexpected identifier

Source: Read range

Exception Type: Exception

System.Exception: Unexpected identifier
at UiPath.Excel.Activities.WorkbookActivity`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)

Thank you!


#2

Hi,


#3

Than you for your answer!

Using Excel application scope seems to do the trick - however, I would very much like to know what went wrong when using the “Read Range” activity by itself, and how this can be avoided in the future. The acitivity worked well with the problematic file just last week, so I don’t know what changed over the weekend.


#4

I’m glad I’m not the only one that runs into problems…

Did you recently upgrade the software? It’s not the first random and unexplainable problem I have, so I’m not too surprised this happened…


#5

I don’t think I have updated the software in a while. I currently run version 2016.2.6274.

In my case, I suspect the sudden change of functionality may be due to me creating a custom Excel activity referencing the Runtime.InteropServices and Office.Interop.Excel assemblies. If I am very unlucky, one of those assemblies have functions that coincide with functions in assemblies already referenced in UiPath, rendering some of these functions ambigous or in any other way leading the Excel activities to behave in unexpected ways.


#6

I don’t use Excel activities, but have the same error. That may point to a different underlying issue.