can a C# plugin return array to Excel? or set Range values?

S

simonbriggs99

My goal is to write a plugin to Excel that has a number of utility
functions.

To date I have been using Interop Automation but cannot get it to
return an array of values, if I do return an array then only the first
value is displayed.

I have been hunting all over the groups and web for ideas on how to
return an array from a C# plugin within Excel. Various ideas have come
up such as referencing the cell that called the function using
Extensibility.IDTExtensibility2 combined with Automation.

I have considered going 'back' to an XLL written in C/C++ but I would
prefer a more '.NET' solution. There is the Visual Studio Tools for
Office route, however there does not appear to be much in the way of
online documentation for creating even a simple plugin that has a
number of functions.

Any ideas or help greatly appreciated, I will share the solution(s)
should they be discovered.


As an aside, the plugin will be calling webservices. C# seems the
natural choice as the web service consumer code is a couple of lines
once the 'web reference' has been added to the visual studio project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top