tags:

views:

276

answers:

2

We have an existing add-in that we publish to users via click once. We would now like to use this as a vehicle to publish some of our existing C# methods directly into Excel so that the users can call them as a UDF.

For example - I have an assembly called MyAssembly, that has a class called MyClass with a public method called MyMethod. I also have an excel addin which adds some item to the ribbon for some custom functionality. I would now like to publish MyAssembly with my existing addin so that a person who has the addin installed can enter =MyMethod into a cell and have my custom method run.

How would one go about doing this?

A: 

Hi,

you have not been very verbose about what you want to do. What do you mean with "users can call them"?

If you mean that add-in methods should be exposed to VBA you can find two articles on that here:

0xA3
Thanks divo - i edited my desc to make it a bit clearer what I am trying to do. I am still looking at your links, but I am not sure that they do what I need.
KevinT
+1  A: 

I solved this quite comprehensively by using ExcelDna, an open source XLL implementation which is very simple to use, and pretty much avoids the whole COM debacle all together. So far it has matched our requirements perfectly...

http://groups.google.com/group/exceldna

KevinT