Excel for WPF and Silverlight
Add(String,Int32,Int32,Int32,Int32) Method

C1.WPF.Excel Namespace > XLNamedRangeCollection Class > Add Method : Add(String,Int32,Int32,Int32,Int32) Method
The name of XLNamedRange object.
The index of the first XLSheet to include.
The index of the last XLSheet to include.
The index of the top row in the cell range.
The index of the left column in the cell range.
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.
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal name As System.String, _
   ByVal firstSheetIndex As System.Integer, _
   ByVal lastSheetIndex As System.Integer, _
   ByVal rowIndex As System.Integer, _
   ByVal colIndex As System.Integer _
) As XLNamedRange
public XLNamedRange Add( 
   System.string name,
   System.int firstSheetIndex,
   System.int lastSheetIndex,
   System.int rowIndex,
   System.int colIndex
)

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).
See Also

Reference

XLNamedRangeCollection Class
XLNamedRangeCollection Members
Overload List