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.
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.
There are two themes for future work. Firstly to improve the current integration .xll:
- Testing on different OS and Excel versions, maybe unit tests.
- 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.
- 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.