[]
Appends an XLNamedRange object to the collection.
public XLNamedRange Add(XLNamedRange namedRange)
Public Function Add(namedRange As XLNamedRange) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| XLNamedRange | namedRange | The XLNamedRange object to add to the collection. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |
Creates an XLNamedRange object and appends it to the collection.
public XLNamedRange Add(string name, XLCellRange cellRange)
Public Function Add(name As String, cellRange As XLCellRange) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| string | name | The name of the named range to create. |
| XLCellRange | cellRange | The XLCellRange to include in the named range. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |
Creates an XLNamedRange object and appends it to the collection.
public XLNamedRange Add(string name, XLCellRange[] cellRanges)
Public Function Add(name As String, cellRanges As XLCellRange()) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| string | name | The name of the named range to create. |
| XLCellRange[] | cellRanges | The array of XLCellRange to include in the named range. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |
Creates an XLNamedRange object and appends it to the collection. This overload creates a range containing a single cell.
public XLNamedRange Add(string name, XLSheet sheet, int rowIndex, int colIndex)
Public Function Add(name As String, sheet As XLSheet, rowIndex As Integer, colIndex As Integer) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| string | name | The name of XLNamedRange object. |
| XLSheet | sheet | The worksheet the range belongs to. |
| int | rowIndex | The row index of the cell in the range. |
| int | colIndex | The column index of the cell in the range. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |
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.
public XLNamedRange Add(string name, int firstSheetIndex, int lastSheetIndex, int rowIndex, int colIndex)
Public Function Add(name As String, firstSheetIndex As Integer, lastSheetIndex As Integer, rowIndex As Integer, colIndex As Integer) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| string | name | The name of XLNamedRange object. |
| int | firstSheetIndex | The index of the first XLSheet to include. |
| int | lastSheetIndex | The index of the last XLSheet to include. |
| int | rowIndex | The index of the top row in the cell range. |
| int | colIndex | The index of the left column in the cell range. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |
Creates an XLNamedRange object and appends it to the collection.
public XLNamedRange Add(string name, XLSheet sheet, int rowIndex, int colIndex, int rowCount, int colCount)
Public Function Add(name As String, sheet As XLSheet, rowIndex As Integer, colIndex As Integer, rowCount As Integer, colCount As Integer) As XLNamedRange
| Type | Name | Description |
|---|---|---|
| string | name | The name of XLNamedRange object. |
| XLSheet | sheet | The worksheet containing the range. |
| int | rowIndex | The index of the top row in the cell range. |
| int | colIndex | The index of the left column in the cell range. |
| int | rowCount | The number of rows in the cell range. |
| int | colCount | The number of columns in the cell range. |
| Type | Description |
|---|---|
| XLNamedRange | 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). |