I’ve tried importing the Microsoft.Office.Interop.Excel namespace, then within an Invoke code activity putting the following:
Dim xl As Microsoft.Office.Interop.Excel.Application
However, I get the following error message:
Main has thrown an exception
Source: Invoke code
Message: Error compiling code
error BC30002: Type ‘Microsoft.Office.Interop.Excel.Application’ is not defined. At line 1
Exception Type: ArgumentException
System.ArgumentException: Error compiling code
error BC30002: Type ‘Microsoft.Office.Interop.Excel.Application’ is not defined. At line 1
But Intellisense in Invoke Method window gives Microsoft.Office.Interop.Excel.Application namespace.
Hi Guys, I fixed that, as vvaidya mentioned, but have still the same issue: error BC30002: Type ‘Microsoft.Office.Interop.Excel.Application’ is not defined. At line 1
Before this fix, there was an error: Cannot find the interop type that matches the embedded type ‘microsoft.office.interop.excel.application’… Any Idea? Thanks.
yes. adding the above assembly reference, workflow works fine. But when I edit the workflow in studio, this manually added reference getting deleted all the time. Please help.
Just hit this issue myself using Microsoft.Office.Interop.Outlook.
If I add the import using the UiPath UI (lower pane) then the reference is not added. I need to manually add the reference two places in the xaml file. Then after I make any edits to the invoke code section the xaml is overwritten and references are lost again.
Hello, I am also trying to use this namespace, however, I cannot declare variables with type of Microsoft.Office.Interop.Excel.Range.Row, could you please help?
If there is a paraticular assembly/namespace you would like to use, try checking if it is provided as nuget.
For this particular case, you can add the assembly from package manager by adding www.nuget.org as one of your nuget feed.
“https://api.nuget.org/v3/index.json” is the source value.