Skip to main content
Row

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Worksheet.MergeCells(CellRange, MergeCellsMode) Method

Merges cells in the specified mode.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.2.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