tags:

views:

34

answers:

1

I have been exploring Excel C API and am now good at getting multi-cell input, doing computations and outputing the result in a single cell. Now I want to output the result in multiple cells, for example:

1) Get a column range as input 2) Sort the numbers (in the cells) 3) Write the sorted numbers in a new column or the same column (in-place)

I couldn't figure out how to write the multi-cell result. I am using "Excel XLL SDK 2010" but any method you propose should be applicable in the older versions of the SDK also.

A: 

In VBA you'd assign a Variant type to a Range for multi-cell assignment. It looks like the equivalent type in the SDK is XLOPER/XLOPER12. Not having used the SDK I couldn't tell you how to use this, but hopefully it gets you started.

Lance Roberts