How can I call a VSTO function from a formula in excel?

I would like to be able to call a function opened by adding VSTO from a cell in an excel sheet. More specifically, if I have a VSTO function Foo () that returns "bar", I would like to write = Foo () in A1, which evaluates the value of "bar" when calculating.

Is it possible? What are the key steps I should take?

The prospect of using managed code and the IDE VS08 for excel development is very attractive. I thought VSTO would let me do this easily, but I'm not sure. Do I really not understand the architecture here? The documentation is a bit cheesy.

+5
source share
3 answers

Excel-DNA ( ) - , (UDF) Excel, .

Excel-DNA Excel, , , RTD-. Excel-DNA Excel XLL Excel, , COM.

+2

I think you can use COM Interop .. here is the web page where I saw the process described.

http://www.cpearson.com/excel/creatingnetfunctionlib.aspx

0
source

All Articles