Returns an IRange interface that represents the merged range containing the specified cell. If the specified cell isn't in a merged range, this property returns the specified cell.
[Visual Basic] Property ReadOnly MergeArea As IRange [C#] IRange MergeArea { get; } [C++] __property IRange* get_MergeArea(); [JScript] function get MergeArea() : IRange
IRange interface.
This example sets the value of the merged range that contains cell A3.
[C#]
IRange r = book.Worksheets[1].Range["A3"].MergeArea;
r[1,1].Value = String.Format("{0}x{1}", r.Rows.Count, r.Columns.Count);
[Visual Basic]
Dim r As IRange = book.Worksheets(1).Range("A3").MergeArea
r(1,1).Value = String.Format("{0}x{1}", r.Rows.Count, r.Columns.Count)
[C++]
IRange* r = book->Worksheets->Item[1]->Range->Item[S"A3"]->MergeArea;
r->Item[1,1]->Value = String::Format(S"{0}x{1}", r->Rows->Count, r->Columns->Count);
IRange Interface | NativeExcel Namespace | MergeCells Property