Creates an
XLNamedRange object and appends it to the collection. This overload allows you to create a 3-D reference to the same range of cells on multiple worksheets.
'Declaration
Public Overloads Function Add( _
ByVal As System.String, _
ByVal As System.Integer, _
ByVal As System.Integer, _
ByVal As System.Integer, _
ByVal As System.Integer _
) As XLNamedRange
'Usage
Dim instance As XLNamedRangeCollection
Dim name As System.String
Dim firstSheetIndex As System.Integer
Dim lastSheetIndex As System.Integer
Dim rowIndex As System.Integer
Dim colIndex As System.Integer
Dim value As XLNamedRange
value = instance.Add(name, firstSheetIndex, lastSheetIndex, rowIndex, colIndex)
public XLNamedRange Add(
System.string ,
System.int ,
System.int ,
System.int ,
System.int
)
Parameters
- name
- The name of XLNamedRange object.
- firstSheetIndex
- The index of the first XLSheet to include.
- lastSheetIndex
- The index of the last XLSheet to include.
- rowIndex
- The index of the top row in the cell range.
- colIndex
- The index of the left column 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).