Excel for WPF | ComponentOne
C1.WPF.Excel Namespace / XLNamedRangeCollection Class / Insert Method
The position where the object will be inserted.
The named range to insert in the collection.

In This Topic
    Insert Method (XLNamedRangeCollection)
    In This Topic
    Inserts an XLNamedRange object at a specific position in the collection.
    Syntax
    'Declaration
     
    
    Public Function Insert( _
       ByVal index As Integer, _
       ByVal namedRange As XLNamedRange _
    ) As XLNamedRange

    Parameters

    index
    The position where the object will be inserted.
    namedRange
    The named range to insert in the collection.

    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