Xceed Workbooks for .NET v1.4 Documentation
Add(String,String,Boolean,Boolean) Method


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > MergedCellCollection Class > Add Method : Add(String,String,Boolean,Boolean) Method
Base 0 index that represents the top left element of the CellRange to add to the collection.
Base 0 index that represents the bottom right element of the CellRange to add to the collection.
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.
Adds a CellRange element in the MergedCellCollection by providing the addresses of the Cells that start and end the range.
Syntax
'Declaration

 

Public Overloads Function Add( _

   ByVal startingCellAddress As String, _

   ByVal endingCellAddress As String, _

   Optional ByVal isCenter As Boolean, _

   Optional ByVal isMergeAcross As Boolean _

) As CellRange
'Usage

 

Dim instance As MergedCellCollection

Dim startingCellAddress As String

Dim endingCellAddress As String

Dim isCenter As Boolean

Dim isMergeAcross As Boolean

Dim value As CellRange

 

value = instance.Add(startingCellAddress, endingCellAddress, isCenter, isMergeAcross)

Parameters

startingCellAddress
Base 0 index that represents the top left element of the CellRange to add to the collection.
endingCellAddress
Base 0 index that represents the bottom right element of the CellRange to add to the collection.
isCenter
Centers the text horizontally and 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

Reference

MergedCellCollection Class
MergedCellCollection Members
Overload List