ComponentOne Excel for .NET
C1.Excel Assembly / C1.Excel Namespace / XLNamedRangeCollection Class / Add Method / Add(String,XLSheet,Int32,Int32,Int32,Int32) Method
The name of XLNamedRange object.
The worksheet containing the range.
The index of the top row in the cell range.
The index of the left column in the cell range.
The number of rows in the cell range.
The number of columns in the cell range.

In This Topic
    Add(String,XLSheet,Int32,Int32,Int32,Int32) Method
    In This Topic
    Creates an XLNamedRange object and appends it to the collection.
    Syntax
    'Declaration
     
    Public Overloads Function Add( _
       ByVal name As System.String, _
       ByVal sheet As XLSheet, _
       ByVal rowIndex As System.Integer, _
       ByVal colIndex As System.Integer, _
       ByVal rowCount As System.Integer, _
       ByVal colCount As System.Integer _
    ) As XLNamedRange
    public XLNamedRange Add( 
       System.string name,
       XLSheet sheet,
       System.int rowIndex,
       System.int colIndex,
       System.int rowCount,
       System.int colCount
    )

    Parameters

    name
    The name of XLNamedRange object.
    sheet
    The worksheet containing the range.
    rowIndex
    The index of the top row in the cell range.
    colIndex
    The index of the left column in the cell range.
    rowCount
    The number of rows in the cell range.
    colCount
    The number of columns in the cell range.

    Return Value

    A reference to the object if it was successfully added to the collection, or null if the object could not be added (usually because it overlaps another cell range already in the collection).
    See Also