I am porting a legacy pricing engine to C# and I would like to expose this newly created library to Excel spreadsheet users. I've looked on the EE board and see that there have been questions like this in the past:
Lets assume for now that my class is very simple:
public class Bond
private double _Coupon;
public double Coupon
_Coupon = value;
Could someone point me in the best direction for getting this class exposed to an Excel user?
I'd like to allow the user to call this library from VBA (so I'll need a declaration and a wrapper). For now, lets just assume that all I want to do is return the "Coupon" property from the Bond Class.
I am more interested in the methodology/approach/synta
x for bulilding/registering/refe
rencing the DLL , declaring the C# class and Calling it from VBA. I've done something similar in the past w/ C/C++, but not since .NET. Its been awhile and I'm hoping that there is a simple approach out there.
I've looked at using the Microsoft Office System Project templates in VS2003 and the Extensibility project Templates. Unlclear to me what value the Office Sytem Project templates have in this case. It would be nice just to be able to have this class libary available for multiple purposes (calling it from a Web project, command line interface and Excel), so keeping the library clean is important to me.
I'd eventually like produce an XLL for pure spreadsheet users (beyond the scope of this question) as well as a DLL for VBA users, but for now I would settle for a DLL that I could have VBA users call.
I have a lot of legacy code here and I am eager to get moving on this, so I am setting the point value high to encourage those of you who have been through this to give me a hand.
Much appreciated. Would be happy to clarify if anyone out there has questions.