CodePlex Project Hosting

I have created a CodePlex project for ExcelDna, available at http://www.codeplex.com/exceldna.

I consider the move experimental, but I hope that a public website and mainstream hosting of the project might increase the visibility a bit. I will continue to monitor and post new releases to the Google Group http://groups.google.com/group/exceldna as well.

I have imported the source code history since the first public release in May 2006. The latest release remains version 0.18.

Also worth checking out is the great work on the ExcelDna Contributions project at http://www.codeplex.com/exceldnacontrib.

ExcelDna 0.18 - Excel 2007 Multi-Threaded Recalculation

I have posted ExcelDna version 0.18 to the Files section of the
Google Group: http://exceldna.googlegroups.com/web/ExcelDna-0.18.zip.

This version adds support for multi-threaded recalculation in Excel
2007 (http://msdn.microsoft.com/en-us/library/bb687899.aspx). Just
mark your ExcelDna function with IsThreadSafe=true. Of course you need
to ensure that your function really is thread-safe. An example is
pasted below.

If you make calls with high latency, such as calls to a web service or
in the example below, you might like to increase the number of threads
that Excel uses beyond the number of physical processes. This can be
done in the Advanced Options tab. If your functions are compute-
intensive, the optimal number of threads is probably the number of
processors, which is the Excel default setting.

Please also read the notes on ExcelDna version 0.17 (http://
groups.google.com/group/exceldna/browse_thread/thread/
411b44e139a2c1b3), where some breaking changes to the type model for
ExcelDna functions were introduced.

As always, your feedback is appreciated very much.

--Govert--


<DnaLibrary Name="ExcelDna MTR Test AddIn" Language="C#">
<![CDATA[
using System;
using ExcelDna.Integration;

public class MyFunctions
{
   [ExcelFunction(Category="MTR Test Functions")]
   public static object NonMtrFunction(object arg)
   {
      return arg;
   }

   [ExcelFunction(Category="MTR Test Functions",
IsThreadSafe=true)]
   public static object MtrFunction(object arg)
   {
      System.Threading.Thread.Sleep(1000);
      return arg;
   }
]]>
</DnaLibrary>

ExcelDna 0.17 - Excel 2007 Data Types

I have posted ExcelDna version 0.17 to the Files section of the Google Group: http://exceldna.googlegroups.com/web/ExcelDna-0.17.zip. The changes are listed below.

PLEASE BE CAREFUL - THIS VERSION HAS BREAKING CHANGES.

I welcome any feedback on this version, including just a note saying that it works (especially on older versions of Excel). If you have any problem understanding the changes, please post a message to the Google Group- I'll be happy to clarify and help get your add-in working again.

The aims with this version were to implement the Excel 2007 data type support and to simplify (and hopefully stabilise) the data type interface between your add-in functions and ExcelDna. Details below...

Next for ExcelDna, I plan to rework some of the marshaling internals in order to implement support for the multi-threaded recalculation in Excel 2007. This work should also allow some nice extensions to be added . . .

--Govert--

The main changes from v. 0.16 are:
* Support added for the Excel 2007 large sheet, large arrays and long Unicode strings.
* BREAKING CHANGE: I made changes to the data types passed into 'object' parameters (under all versions of Excel):
- Missing arguments are received as a new type: ExcelDna.Integration.ExcelMissing, no longer as
System.Reflection.Missing.
- Empty cells are received as a new type: ExcelDna.Integration.ExcelEmpty, no longer as nulls.
- Please study the Describe function in MoreSamples.dna carefully.
* BREAKING CHANGE: Calling XlCall.Excel now will never return a short or int, but returns a double for all numeric call results.

Smaller changes and fixes:
* The system codepage is used for string conversions under Excel versions pre 2007 (thanks to Martin Drescher).
* When the .xll is reloaded via File->Open, I do a close and open, which reloads the .dna file.
* IsInFunctionWizard now returns false when called from the Find/Replace dialog box on English verisons of Excel.
* Internal references received from Excel are populated with the SheetId of the Current sheet before being returned as an ExcelReference. In effect internal references (SREFs) are no longer exposed by ExcelDna, all ExcelReferences are considered external references.

ExcelDna Google Group

The Google group http://groups.google.com/group/exceldna is currently the ExcelDna home. 

ExcelDna version 0.14

I have reworked the loader architecture of ExcelDna, now available as the experimental version 0.14. Check out the details (and post comments or questions) at the Google Group: http://groups.google.com/group/ExcelDna.

- Govert

ExcelDna Version 0.11

I've uploaded ExcelDna version 0.11 to http://exceldna.typepad.com/blog/files/ExcelDna-0.11.zip.

This version should fix the mysterious loading errors reported since version 0.8. The problem was related to Visual Studio 2005 Service Pack 1, which has a new version of the C runtime libraries. The
embedded manifest in recent versions of ExcelDna.xll required the new version of the CRT to be loaded with ExcelDna. I have now changed the manifest that is embedded to require the RTM version as before.

Please let me know if you still have errors loading ExcelDna with this version, also on Excel 2007.

Other significant features and fixes since version 0.7:
* Fixed bug when library had function with object[] and object[,] arguments.
* Fixed bug when more that 20 arguments. (At most 20 argument descriptions are allowed.)
* Methods can be dynamically registered in the AutoOpen method of an AddIn.
ExcelDna.Integration.XlLibrary.RegisterMethods(..) takes a list of MethodInfos to register. See sample08.dna for an example.
* Arguments of type object[] and double[] now also accept single column values. If the range passed in has exactly one column, that column is used as the array. If more than one column is passed, the first row is used, as before. object[,] and double[,] have not changed.

As always, your feedback is much appreciated. Please post your comments or questions at the ExcelDna Google Group.

Google Group for ExcelDna

I have created a Google discussion group for ExcelDna at http://groups.google.com/group/exceldna.

Any comments, questions and suggestions for ExcelDna can be posted there. As always you are welcome to contact me directly.

ExcelDna version 0.9

Download ExcelDna-0.9.zip

Changes from version 0.7 are:

  • Methods can be dynamically registered in the AutoOpen method of an AddIn.
    ExcelDna.Integration.XlLibrary.RegisterMethods(..) takes a list of MethodInfos to register. See Sample08.dna for an example.
  • Arguments of type object[] and double[] now also accept single column values. If the range passed in has exactly one column, that column is used as the array. If more than one column is passed, the first row is used, as before. object[,] and double[,] have not changed.
  • Minor changes to the Logging window.
  • Fixed bug when more that 20 arguments, when there is a function description. (At most 20 argument descriptions are allowed by the Excel API.) There is still a restriction on the combined length of the argument names, approximately 200 characters.

Minor Update - ExcelDna 0.7

I've fixed a serious but obscure bug. Download ExcelDna-0.7.zip

When reading a string array as input parameter to a user-defined function, the marshaling sometimes caused an access violation by reading beyond the end of allocated memory. This would only happen when Excel is under some stress, as in real-time applications. In fixing this I have also cleaned up some of the marshaling code. A big thank you to Mark for helping me track this down :-)

So if you have had problems with your add-ins crashing under load, or in a real-time setting, please give it a try again. As always I'd love to hear your feedback about ExcelDna.

Minor update - version 0.5

I've posted a minor update. Download ExcelDna-0.5.zip

  • Fixed stack overflow when loading addin with no .dna file.
  • Fixed Excel crash when returning empty array for double[] return type.
  • Changed unload behaviour. Methods, commands and menus are unloaded only when AutoRemove is called (when the addin is removed from the AddIns list). I still call then Add-In's AutoClose when Excel calls AutoClose - when Excel is closed this happens before confirmation prompt.