Show / Hide Table of Contents

Class WorksheetMergedCellsRegion

Represents a merged region of cells, or cells which share a value and format and appear as one cell when viewed in Microsoft Excel.

Inheritance
System.Object
WorksheetRegion
WorksheetMergedCellsRegion
Implements
System.Collections.Generic.IEnumerable<WorksheetCell>
System.Collections.IEnumerable
Inherited Members
WorksheetRegion.Equals(Object)
WorksheetRegion.GetHashCode()
WorksheetRegion.ToString()
WorksheetRegion.ApplyArrayFormula(String)
WorksheetRegion.ApplyFormula(String)
WorksheetRegion.FormatAsTable(Boolean)
WorksheetRegion.FormatAsTable(Boolean, WorksheetTableStyle)
WorksheetRegion.GetBoundsInTwips()
WorksheetRegion.GetBoundsInTwips(PositioningOptions)
WorksheetRegion.ToString(CellReferenceMode, Boolean)
WorksheetRegion.ToString(CellReferenceMode, Boolean, Boolean, Boolean)
WorksheetRegion.FirstColumn
WorksheetRegion.FirstRow
WorksheetRegion.LastColumn
WorksheetRegion.LastRow
WorksheetRegion.Worksheet
Namespace: Infragistics.Documents.Excel
Assembly: IgniteUI.Blazor.Documents.Excel.dll
Syntax
public class WorksheetMergedCellsRegion : WorksheetRegion, IEnumerable<WorksheetCell>, IEnumerable, ICellFormatOwner, IWorksheetCellFormatProxyOwner
Remarks

Merged cell regions cannot overlap (a cell can only belong to one merged cell region). In addition, ArrayFormula and WorksheetDataTable instances cannot be applied to merged cell regions.

Properties

CellFormat

Gets the cell formatting for the merged cell region.

Declaration
public IWorksheetCellFormat CellFormat { get; }
Property Value
Type Description
IWorksheetCellFormat

The cell formatting for the merged cell region.

Comment

Gets or sets the comment for the merged cells region.

Declaration
public WorksheetCellComment Comment { get; set; }
Property Value
Type Description
WorksheetCellComment

The comment for the merged cells region.

Remarks

The comment of the merged region can also be accessed from the top-left cell of the merged region of cells.

Formula

Gets the formula which has been applied to the merged region.

Declaration
public Formula Formula { get; }
Property Value
Type Description
Formula

The formula which has been applied to the merged region or null if no formula has been applied.

Value

Gets or sets the value of the merged cell region.

Declaration
public object Value { get; set; }
Property Value
Type Description
System.Object

The value of the merged cell region.

Remarks

The types supported for the value are:

  • System.Byte
  • System.SByte
  • System.Int16
  • System.Int64
  • System.UInt16
  • System.UInt64
  • System.UInt32
  • System.Int32
  • System.Single
  • System.Double
  • System.Boolean
  • System.Char
  • System.Enum
  • System.Decimal
  • System.DateTime
  • System.String
  • System.Text.StringBuilder
  • System.DBNull
  • ErrorValue
  • FormattedString

Exceptions
Type Condition
System.NotSupportedException

The assigned value's type is not supported and can't be exported to Excel.

System.InvalidOperationException

The value assigned is a Formula. Instead, ApplyTo(WorksheetCell) should be called on the Formula, passing in the cell.

System.InvalidOperationException

The value assigned is a WorksheetDataTable. Instead, the CellsInTable should be set to a region containing the cell.

System.InvalidOperationException

The value assigned is a FormattedString which is the value another cell or merged cell region.

System.InvalidOperationException

The value is assigned and this cell is part of an ArrayFormula or WorksheetDataTable.

See Also
Value
IsCellTypeSupported(Type)

Methods

GetResolvedCellFormat()

Gets the resolved cell formatting for this merged cell region.

Declaration
public IWorksheetCellFormat GetResolvedCellFormat()
Returns
Type Description
IWorksheetCellFormat

A format object describing the actual formatting that will be used when displayed this cell in Microsoft Excel.

Remarks

If any cell format properties are the default values on the merged cell region, the values from the owning row's cell format will be used. If those are default, then the values from the owning column's cell format will be used. Otherwise, the workbook default values will be used.

See Also
CellFormat
CellFormat

Implements

System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable