Version

Value Property (WorksheetMergedCellsRegion)

Gets or sets the value of the merged cell region.
Syntax
'Declaration
 
Public Property Value As Object
public object Value {get; set;}

Property Value

The value of the merged cell region.
Exceptions
ExceptionDescription
System.NotSupportedException The assigned value's type is not supported and can't be exported to Excel.
System.InvalidOperationExceptionThe value assigned is a Formula. Instead, Formula.ApplyTo should be called on the Formula, passing in the cell.
System.InvalidOperationExceptionThe 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.InvalidOperationExceptionThe value is assigned and this cell is part of an ArrayFormula or WorksheetDataTable.
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

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also