Hi Vineeth,
Excel supports 'array formulae' which allow you to use an array of
values in a single function call. These are entered into the Excel
sheet by selected the target range of cells, then typeing in the
formula and pressing Ctrl+Shift+Enter to set it is an array formula
for the range. You'll such a formula see it displayed in Excel with
curly brackets {=GetTheData()}.
There are many hits of Google for 'Excel array formula' - this seemed
like a good start:
http://www.cpearson.com/excel/ArrayFormulas.aspx.
To define an array function in you Excel-DNA add-in, just return the
data as an object[,] array.
Sometimes it's an issue to manage the size of the resulting array -
Excel assumes you already know the expected size. Excel-DNA can help
manage this - have a look at the ArrayResizer.dna example in the Excel-
DNA distribution.
Regards,
Govert
On Jul 14, 9:18 am, Vineeth <
VineethMo...@algotree.com> wrote:
> Hi ,
>
> I am a total newbie to Excel programming or Excel DNA or even C# :(
>
> I have a C# library which i can use to interface with my hosted server. I
> need to integrate that with MS Excel 2010.
> So my purpose is as simple as reading parameters from a function in Excel ,
> calling my web interface , getting back a time series and displaying it as
> a table in Excel.
>
> So far , i was able to return single values but i am not able to make excel
> display the 2 dimensioned array as a table.
>
> Please guide me on how to do this.
> Also it would be of great help if someone can give links to functions like
> how to read from cells in current Excel sheet and how to write back values
> to each cell.
>
> Thanks
> Vineeth