cexcelxll

How can I specify that an XLL function should spill?


When creating an XLL using Excel's C API, how can I specify that a worksheet function defined in the XLL returning a range should spill?

I know that I can return an array by specifying 'Q' as the return type when registering the function with xlfRegister, but then I get a non-spilling array function.

Unfortunately, I did not find anything about that in Microsoft's documentation. (Yet it should be possible, since PyXLL supports it, and I guess they also use the C API to create their product.)


Solution

  • You need to specify the return array with the letter U (Xloper 12).

    I haven't found any official documentation on this either.