Changing reference to [Microsoft.Office.Interop.Excel.dll]

Hi there

There used to be a time/version where after importing namespace [Microsoft.Office.Interop.Excel], I could get access to the “real” Microsoft Excel namespace, and define variable of types under said namespace.
However, after upgrading to 2018.4.1 Community Edition, the access is no more available. When looking up in the “Browse and Select a .Net Type” dialog, there’s only a “UiPath”.Excel, which defines a namespace of the same name as the Microsoft version but with different methods etc.

So the question is: is it possible to explicitly redirect the reference to Microsoft.Office.Interop.Excel.dll?

p.s: I know I can build my custom activity and import the dll I need, but the client doesn’t want anything “unofficial”, thus the question here. And no, unfortunately the “UiPath”.Excel doesn’t meet the needs.

Hi @Haifisch

Could you try this method and see if it will solve your needs?

This behaviour is an outcome of the dependency management introduced since 2018.3. Basically, the only way to load an assembly into the project is to have an activity that will use said dependency.

There might be a workaround (although not tested), in which you add the custom activity to the project by dragging it into the sequence and then saving and restarting the project. It might keep it afterwards even after you delete said activity.
(please let us know if such workaround worked for you :slight_smile: )

We will definitely look for ways to improve this behaviour with future UI improvements in upcoming releases.

1 Like

Hi @loginerror

Adding [Microsoft.Office.Interop.Excel] to Assembly Reference and deleting [UiPath.Excel] seems to have solved the problem.
Thx a lot.

We will definitely look for ways to improve this behaviour with future UI improvements in upcoming releases.

Does that mean there will be a GUI to modify Assembly Reference? That would definitely come in handy.

Yes, I think the plan is to allow users to specify which assemblies should be loaded with the project.

Good afternoon @loginerror

Do you know if the GUI feature has been implemented as of today?