Request: custom marshaling

May 20, 2011 at 10:45 AM
Hi Govert - great work on ExcelDna! I have used a similar component in the past and you have captured many of the key features. Much thanks! One of the areas where I feel ExcelDna is falling short is in the marshaling of values between Excel and .Net. From what I have seen, because of the assumptions currently in place it becomes hard to insert an automagic object cache or have certain function return types be written to Excel in specific ways. Is there any timeline for opening up the in/out marshaling to allow for injecting custom designed marshaling in a simple manner? Thanks! Ryan
Coordinator
May 20, 2011 at 11:20 AM

Hi Ryan,

To be clear about the use of such extensible marshaling: the current version supports all the function signatures that can be registered with Excel. So your users in Excel would not have a different experience when using your add-in and your function can already return any type supported by Excel. However, the kind of support you describe could in some cases make the implementation code much more elegant, and is something I would like to get in place.

I did some work last year to experiment with customizable marshaling, but have not been able to get it together properly. My priorities since then have been to support major features that you really could not implement in your add-in - .NET 4 support, Ribbon and RTD servers and 64-bit Excel support. With this mostly in place now, I can start thinking again about future priorities.

My Excel-DNA efforts for the next while will probably have to be focused on documentation, samples and help to get new users started more easily. I'm particularly keen to figure out how to help VBA users make the shift to .NET. So before I get to advanced plumbing, I think it is time to consolidate a bit.

As for major features in the Excel-DNA runtime, I am currently thinking of three areas for future attention, not necessarily in this order:

* Asynchronous functions,

* Extensible marshaling,

* An Excel-DNA editor.

A time-line - I don't expect to have much time for serious work on Excel-DNA until the end of the year. So you probably shouldn't hold your breath, but it is on the to-do list.

Regards,

Govert

May 25, 2011 at 12:20 AM

Hi Govert, thanks for the info. I am in agreement on the concept that the custom marsheller cleans up the code rather than change the excel users experience. Do you accept patches from users? If this is something I work on and submit would you have interest in it? Not sure I can but worth asking if I can drum up the time....

Coordinator
May 28, 2011 at 10:28 AM

Hi Ryan,

I'd certainly welcome your help, but I suggest you contact me directly before you get started. It's a tricky part of Excel-DNA that I have some plans to change in future, so we should synchronize our efforts.

-Govert

Jun 21, 2011 at 2:28 AM

i have been playing with marshalling... and tables of Running  ROM and and stuff.

It is all OS C code with private structures and matching binary layouts in Kernel tables.

http://msdn.microsoft.com/en-us/library/637yedyt.aspx

http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.comtypes.irunningobjecttable.enumrunning(v=VS.100).aspx

I would like to get a test function that returns a list of the running COM objects,

and you can launch another... only it seems to all C structs with OS dependencies.

I'm not ready to start mixing languages right away.

It strikes me that it would be nice to just have excel functions that execute simple

things like "a list of running com objects' and a list of environment vars, registry vars, etc. etc.

as an exercise in getting the excel UDF interface down right.

 

 

db