GemBox.Spreadsheet

CellRange.Merged Property

Gets or sets whether cells in this range are merged.

public virtual bool Merged {get; set;}

Remarks

By setting this property to true, you are merging all the cells (ExcelCell) in this range. Merging process will fail if any of the cells in the range is already merged.

When modifying merged cell, whole merged range is modified. For example, if you set ExcelCell.Value, value of merged range will be modified. You can find out if the cell is merged by checking if ExcelCell.MergedRange property is different than null.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown when merged range can't be created because some of the cells in the range are already merged.

See Also

CellRange Class | GemBox.Spreadsheet Namespace