ComponentOne Excel for .NET
C1.Excel Assembly / C1.Excel Namespace / XLNamedRangeCollection Class / Add Method / Add(String,XLCellRange) Method
The name of the named range to create.
The XLCellRange to include in the named range.

In This Topic
    Add(String,XLCellRange) 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 cellRange As XLCellRange _
    ) As XLNamedRange
    public XLNamedRange Add( 
       System.string name,
       XLCellRange cellRange
    )

    Parameters

    name
    The name of the named range to create.
    cellRange
    The XLCellRange to include in the named 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