C# (sharp) and Excel

L

Ludwig

I am learning some C# and I wonder if I can create dll fiels to be
used in Excel. I saw others post on DLL and tried out a few things
but was not able to make it work. They are al financial functions.

I did:

Go to Excel and declare the functions and also load them up as a
reference.


BUt it did not work.

any help would be appreciate it.

System info

p4 2 gigz
512 ram
Windows XP
Excel 2000
Visual Studio.NET
Microsoft Developement Environment 2002 V 7.0.9466

regards,

Ludwig
 
S

Stephen Bullen

Hi Ludwig,
I am learning some C# and I wonder if I can create dll fiels to be
used in Excel. I saw others post on DLL and tried out a few things
but was not able to make it work. They are al financial functions.

I did:

Go to Excel and declare the functions and also load them up as a
reference.

BUt it did not work.

any help would be appreciate it.

Really the only way to do it is to expose your functions in a COM
Class, then use those from Excel (by adding a reference to that class
and Tools > References or using 'Automation Addins'). If you search
the .Net help for "COM Class" (no quotes), you should see a C# example
of both client and server. Once you've built that, search again for
'Automation Addin' and you should find an example of how to use it in
Excel.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top