Skip to main content
All docs
V25.1
  • Row

    Worksheet.MergeCells(CellRange, MergeCellsMode) Method

    Merges cells in the specified mode.

    Namespace: DevExpress.Spreadsheet

    Assembly: DevExpress.Spreadsheet.v25.1.Core.dll

    NuGet Package: DevExpress.Spreadsheet.Core

    Declaration

    void MergeCells(
        CellRange range,
        MergeCellsMode mode
    )

    Parameters

    Name Type Description
    range CellRange

    A CellRange object that specifies the range of cells to be merged.

    mode MergeCellsMode

    A MergeCellsMode enumeration member that specifies how to merge cells.

    Remarks

    To unmerge cells, use the Worksheet.UnMergeCells method.

    Another way to merge and unmerge a cell range is to use the range’s RangeExtensions.Merge and RangeExtensions.UnMerge extension methods, defined by the RangeExtensions class. These extension methods are accessible as methods of the CellRange object and called by using the instance method syntax.

    See Also