Excel 2010 XLL SDK

| 3 Comments

I'm currently looking at the Excel 2010 XLL SDK which is part of the Office 2010 Technical Preview. I've already built and tested my managed XLL system with Excel 2010 on x86 but I needed the new XLL SDK to be able to build for the x64 version of Excel. The SDK doesn't ship as part of the main Office 2010 installation, you have to ask for it.

So far things look reasonably good in x86 mode. The code that I have been developing worked fine in Excel 2010 without needing the new SDK at all; which is how it should be given there will be x86 XLLs out there that have been around since Excel v4...

The x64 side of things is looking a little less rosy at this point. It took me a while to set up the x64 builds for my projects and to deal with the inevitable warnings that you get from building as x86 and then switching to x64. That's all been dealt with and the XLL loads nicely into Excel 2010 and works fine right up to the point where it switches to managed code for the first time; during this transition one of Excel's threads goes off on one and pegs a cpu at 100% whilst Process Explorer's stack capture shows that it's somewhere deep inside of CorBindToCurrentRuntime(). I've narrowed the problem down and sent a variation on the 'generic' example XLL back to my Microsoft contact so that they can look at the problem.

So, right now, Excel 2010 x64 support for my managed XLLs is on hold.

I haven't yet started to dig into the new SDK's features yet but there is native support for 'asynchronous' XLL functions (which look somewhat less powerful than the support for this kind of thing that I already have in place) and a few other new things. Right now my focus is on cleaning up the existing functionality that I have, testing with all versions of Excel and getting to the point where I can start my beta testing phase.

3 Comments

Latest feedback from my Microsoft contact is that they can't reproduce my x64 problem with the latest build. I'll retest when the next public release occurs.

I know it's kinda noobish to ask this but I want to return a multi-cell result from my custom function which I have written using the Excel XLL SDK 2010 (x86). I can return single cell result and read multi-cell as input but couldnt figure out how to return multi-cell result. I will really appreciate if you could guide me and a piece of code would be highly appreciated :)

Thanks,
Salman
ProgrammerFish.com

Salman,

You return an XLOPER with a dynamically allocated array in the val.array element and a type of xltypeMulti.

Leave a comment