Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / CellRange Class / MergeCells Method

Centers the text horizontally and 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
    MergeCells Method
    In This Topic
    Adds the CellRange in the MergedCellCollection.
    Syntax
    'Declaration
     
    
    Public Sub MergeCells( _
       Optional ByVal isCenter As Boolean, _
       Optional ByVal isAcross As Boolean _
    ) 
    'Usage
     
    
    Dim instance As CellRange
    Dim isCenter As Boolean
    Dim isAcross As Boolean
     
    instance.MergeCells(isCenter, isAcross)
    public void MergeCells( 
       bool isCenter,
       bool isAcross
    )

    Parameters

    isCenter

    Centers the text horizontally and vertically.

    The default value is true.

    isAcross

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

    The default value is false.

    Supported Frameworks

    .NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.

    .NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.

    See Also