Import Microsoft.Office.Interop.Excel does not work


#1

Hello everybody,
I have a problem. I want to Import the Namespace Microsoft.Office.Interop.Excel. But everytime I try it, my program stucks. And when it is working again i can not use the Namespace.


Can some one help me?
Thanks


#2

HI @fejac,
May I know the usage of this. Because in Uipath, It has many activities related to Excel.

Regards
Balamurugan.S


#3

I would like to write into a Cell of a Excesheet


#4

HI @fejac,
Why don’t you use Write Cell Activity inside the Excel application scope . For more information about Excel you can see …

or

  1. https://www.uipath.com/tutorials/excel-and-datatables-automation
  2. https://www.uipath.com/automate/excel-automation
  3. https://activities.uipath.com/docs/excel-write-cell

Regards
Balamurugan.S


#5

I allready did that. ButI want to use VB.net because I think it is faster.


#6

Try this


#7

Thanks! It is working now.


#8

fejac, can you please share your solution? I’ve just tried: Dim xl as Microsoft.Office.Interop.Excel.Application was found in Intelisense, but there is an error, as I run the process - Type Microsoft.Office.Interop.Excel.Application is not defined… Any idea?


#9

if not automatically added, check if you have the below name space (5th or 6th line from top), if not try adding

image

xmlns:moie=“clr-namespace:Microsoft.Office.Interop.Excel;assembly=Microsoft.Office.Interop.Excel”


Invoke Code doesn't work when trying to manipulate Excel because of missing Assemblies
#10

@vvaidya , thank you so much!!! Now it’s working, BUT!

As I will do any changes in “Invoke code”, than the part of xmlns:moie will be removed… So I need to add there this part and it’s working properly. Any Idea? But anyway, thanks a lot, you fixed my critical issue, but this “bug” could be fixed too :).

Frantisek


#11

Can you please explain where can i add excel dll reference manually