GET.CELL
Macro Sheets Only
Returns information about the formatting, location, or contents of a cell. Use GET.CELL in a macro whose behavior is determined by the status of a particular cell.
So I guess it really does only work for a single cell.
If you're looking for the underlying values and not the displayed text, you can just do "ExcelReference.GetValue()" and that will give you an array.
This also matches (somewhat) the result of the COM object model property "Range.Text", for which we have this:
The Text property is most often used for a range of one cell. If the range includes more than one cell, the Text property returns Null, except when all the cells in the range have identical contents and formats.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/a9436b63-4118-48da-8144-886534687b7cn%40googlegroups.com.

Hi Andrey
The book does say that just the “ ..top left cell.. “ value is returned for a range.

Peter
From: exce...@googlegroups.com <exce...@googlegroups.com> On Behalf Of Andrey Eremenko
Sent: 16 June 2021 01:02
To: Excel-DNA <exce...@googlegroups.com>
Subject: Re: [ExcelDna] Get an array of values from xlfGetCell
Financial Applications Using Excel Add-in Development in C/C++ book says that it should be possible to get information about ranges as well.
Screenshot from page 291:

To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/bd3b3b14-4e9b-4d67-bca7-edacb675de0fn%40googlegroups.com.