NativeExcel for .Net Developer's Reference

IRangeRows.MergeMethod

Merges cells in each row of the specified range.

[Visual Basic]
SubMerge()
[C#]
voidMerge();
[C++]
voidMerge();
[JScript]
functionMerge();

Remarks

The value of a merged range is specified in the cell of the range's upper-left corner.

Example

This example merges cells in each row of the range A1:F20 on sheet one.

[C#]
 book.Worksheets[1].Range["A1:F20"].Rows.Merge();
[VisualBasic]
 book.Worksheets(1).Range("A1:F20").Rows.Merge()
[C++]
 book->Worksheets->Item[1]->Range->Item[S"A1:F20"]->Rows->Merge();

See Also

IRangeRows Interface | NativeExcel Namespace | IRange.Merge Method | Merge | IRangeColumns.Merge Method | Merge | UnMerge Method | MergeCells Property