Gets or sets a value that indicates whether the specified range contains merged cells.
[Visual Basic] Property MergeCells As Boolean [C#] bool MergeCells { get; set; } [C++] __property bool get_MergeCells(); __property void set_MergeCells(bool ); [JScript] function get MergeCells() : bool function set MergeCells(bool);
true if the specified range contains merged cells; otherwise, false.
This example sets the value of the merged range that contains cell A3.
[C#]
IRange range;
range = book.Worksheets[1].Range["A3"];
if (range.MergeCells)
range.MergeArea[1,1].Value = "Merged cells";
[Visual Basic]
Dim range As IRange
range = book.Worksheets(1).Range("A3");
If (range.MergeCells) Then
range.MergeArea(1,1).Value = "Merged cells"
End If
[C++]
IRange* range;
range = book->Worksheets->Item[1]->Range->Item[S"A3"];
if (range->MergeCells)
range->MergeArea->Item[1,1]->Value = S"Merged cells";
IRange Interface | NativeExcel Namespace | Merge Method | UnMerge Method | MergeArea Property