Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / MergedCellCollection Class / Add Method / Add(Int32,Int32,Int32,Int32,Boolean,Boolean) Method
The Id corresponding to the first Row of the CellRange that will be added to the MergedCellCollection.
The Id corresponding to the leftmost Column of the CellRange that will be added to the MergedCellCollection.
The Id corresponding to the last Row of the CellRange that will be added to the MergedCellCollection.
The Id corresponding to the rightmost Column of the CellRange that will be added to the MergedCellCollection.

Centers the text horizontally & vertically. 

The default value is true.

Splits the merge per Row; for example, "A1 : B2" will be merged as "A1: B1" and "A2 : B2".

The default value is false.



In This Topic
    Add(Int32,Int32,Int32,Int32,Boolean,Boolean) Method
    In This Topic
    Adds a CellRange element in the MergedCellCollection, identifying said range using Rows and Columns Ids.
    Syntax
    'Declaration
     
    
    Public Overloads Function Add( _
       ByVal startingRowId As Integer, _
       ByVal startingColumnId As Integer, _
       ByVal endingRowId As Integer, _
       ByVal endingColumnId As Integer, _
       Optional ByVal isCenter As Boolean, _
       Optional ByVal isMergeAcross As Boolean _
    ) As CellRange
    'Usage
     
    
    Dim instance As MergedCellCollection
    Dim startingRowId As Integer
    Dim startingColumnId As Integer
    Dim endingRowId As Integer
    Dim endingColumnId As Integer
    Dim isCenter As Boolean
    Dim isMergeAcross As Boolean
    Dim value As CellRange
     
    value = instance.Add(startingRowId, startingColumnId, endingRowId, endingColumnId, isCenter, isMergeAcross)

    Parameters

    startingRowId
    The Id corresponding to the first Row of the CellRange that will be added to the MergedCellCollection.
    startingColumnId
    The Id corresponding to the leftmost Column of the CellRange that will be added to the MergedCellCollection.
    endingRowId
    The Id corresponding to the last Row of the CellRange that will be added to the MergedCellCollection.
    endingColumnId
    The Id corresponding to the rightmost Column of the CellRange that will be added to the MergedCellCollection.
    isCenter

    Centers the text horizontally & vertically. 

    The default value is true.

    isMergeAcross

    Splits the merge per Row; for example, "A1 : B2" will be merged as "A1: B1" and "A2 : B2".

    The default value is false.

    Requirements

    Target Platforms: Windows 11, Windows 10, 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