ExcelDna brings .NET to Excel power users and developers. The primary target is the Excel user who currently writes VBA code for functions and macros, and would like to start using .NET. An additional audience is C/C++ -based .xll add-in developers who want to use the .NET framework to develop their add-ins.
ExcelDna is free for all use, and distributed under a permissive open-source license that also allows commercial use.
ExcelDna is developed using .NET 2.0, and users have to install the freely available .NET Framework 2.0 runtime. The integration is by an Excel Add-In (.xll) that exposes .NET code to Excel. The user code can be in text-based (.dna) script files (Visual Basic or C#), or compiled .NET libraries from any language.
Current status
ExcelDna allows exporting functions and commands from .NET scripts or compiled libraries. ExcelDna also supports automatic marshaling for calling the Excel C API from .NET, making it easy to port existing C/C++ code that uses the native Excel API. Access to the Excel automation interfaces is available from ExcelDna, and can be used late-bound from Visual Basic, or via a reference to the primary interop assemblies.
ExcelDna is at an early stage of development and has not been tested extensively. This means it might not entirely work as advertised. Please be patient and careful.
Future work
There are two themes for future work. Firstly to improve the current integration .xll:
- Testing on different OS and Excel versions, maybe unit tests.
- Documentation.
- Additional functionality like asyncronous calls and multithreading.
- Preparation for Excel12.
- Other .Net hosted languages (Java via IKVM, IronPython, Boo)
Secondly, it would be really nice to have an editor or IDE for working with .dna scripts. This would then work like the VBA IDE - maybe even with debugging some day! Idealy it would be as easy to create a user-defined function in .NET as it is in VBA.
Related projects
- Visual Studio Tools for Office (VSTO) is Microsoft's preferred plan for integrating .NET with Office. It is mainly aimed at making it easy for Visual Studio developers to create solutions integrated with the Office applications. In constrast, ExcelDna is (eventually) aimed at Excel end-users, as a compelling replacement for VBA, completely independent of Visual Studio.
- Jens Thiel's ManagedXll is an established, commercial product to easily create .xll libraries in .NET. If ManagedXll were free, ExcelDna would not exist. Currently ExcelDna has the functionality of a basic version of ManagedXll.
- There are a number of C/C++ libraries and tools for creating .xlls, apart from the Excel SDK and related examples. In particular I initially used the xlw library, there is also the C++ style xll, and the commercial Xll+ toolkit.
You can help ...
- Feedback, ideas and suggestions are most welcome.
- Do you have any advice or can you offer help manage ExcelDna as a fully fledged open source project (Sourceforge or similar)?
- Further development will need some interested people to help with coding, documenting and testing.
Please contact me if you need assistance, have a comment or would like to help on the project.
Hello
why dont you use a .NET reflector on ManagedXll.
This will give u the code snippets u need
rgds
Posted by: | 06 February 2006 at 10:15
Hi,
I am finding that the ExcelFunctions that I create in my C# dll work fine, but down recalculate when a saved workbook is reopened... any ideas, our should I send you more details?
Many thanks
Graham
Posted by: Graham | 18 September 2006 at 12:39
Hi,
Excel 2000 can not load ExcelDNA.xll. The file format is not recognized -> excel open the xll as a text file.
What is the problem?
Peter
Posted by: Peter | 26 June 2007 at 09:21
Hi, then Excel 2000 Problem was them Problem with .NET 1.1 I solved it with then Excel.exe.config
Peter
Posted by: Peter | 26 June 2007 at 14:53
Hello!`
Posted by: cheng | 16 July 2007 at 06:34
Hi,
I have a problem, I don“t know to use this product when i use functions which return arrays.
For example :
public static double[] SortVector(double[] vector)
{
Array.Sort(vector);
return vector;
}
Can somebody tell me how i have to mark the cells in the excel sheet.
Posted by: juan | 18 July 2007 at 09:45
Hello,
Awesome.
How do I pass in a range in an argument?? I tried --
Function MySum(rng) MySum= rng(1,1)
End Function
but it fails to compile. I want to loop over both the dimensions and sum all the numbers and return the answer.
Saleem
Posted by: Saleem Mukhtar | 28 July 2007 at 20:02
chnkgm pveyxn cqehjzp euftxnmcz hxupks ghrvp gqux
Posted by: pfrojyce uodilkjxh | 16 May 2008 at 15:47
keep up the good work!)
Posted by: Ron | 03 July 2008 at 16:36