After compile, you have to modify your ExcelDna.dna file.
Edit this file with notepad like below.

(v4.0 means your version of .NET framework. modify this number if you need)
(If your DLL's relative-path is not "CSLib.dll" from ExcelDNA.xll, you have to correct this name)
(I deployed CSLib.dll, ExcelDna.xll, ExcelDna.dna in the same folder)

After that, double-click your ExcelDna.xll and create new Excel sheet.
As you'll see below, you can use your own function defined in C# language !

3 件のコメント:

Thank you for this post - I've added a link back from the Excel-DNA page on CodePlex. I would suggest you rename ExcelDna.xll and ExcelDna.dna though, just to avoid confusion with other samples.Regards, Govert