Skip to main content

IXlMergedCells.Add(XlCellRange, Boolean) Method

Merges cells in the specified cell range and appends the resulting merged range to the end of the collection.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

void Add(
    XlCellRange range,
    bool checkOverlap
)

Parameters

Name Type Description
range XlCellRange

A XlCellRange object that specifies a range of cells to be merged.

checkOverlap Boolean

true, to check whether the specified cell range to be merged intersects other merged cells; otherwise, false.

Remarks

Use the Add method with the checkOverlap parameter set to false to disable internal checking of the intersecting merged cells. By default, you cannot merge cells in a range that overlaps existing merged cells in a worksheet. If you do this, a ArgumentException will be thrown. However, if your document contains a large number of merged cells, you can disable checking to accelerate the process of merging cells and document generation. But in this case, you may get an invalid document if there are any merged cells that intersect other merged cells.

See Also