Creates an XLNamedRange object and appends it to the collection. This overload creates a range containing a single cell.

Namespace:  C1.Silverlight.Excel
Assembly:  C1.Silverlight.Excel.5 (in C1.Silverlight.Excel.5.dll)

Syntax

C#
public XLNamedRange Add(
	string name,
	XLSheet sheet,
	int rowIndex,
	int colIndex
)
Visual Basic
Public Function Add ( _
	name As String, _
	sheet As XLSheet, _
	rowIndex As Integer, _
	colIndex As Integer _
) As XLNamedRange

Parameters

name
Type: System..::..String
The name of XLNamedRange object.
sheet
Type: C1.Silverlight.Excel..::..XLSheet
The worksheet the range belongs to.
rowIndex
Type: System..::..Int32
The row index of the cell in the range.
colIndex
Type: System..::..Int32
The column index of the cell in the 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