XmlMappedRange.Item Property

Definition

Gets a Range that represents a range at an offset to the XmlMappedRange control.

public:
 property Microsoft::Office::Tools::Excel::XmlMappedRange_ItemType ^ Item { Microsoft::Office::Tools::Excel::XmlMappedRange_ItemType ^ get(); };
public Microsoft.Office.Tools.Excel.XmlMappedRange_ItemType Item { get; }
member this.Item : Microsoft.Office.Tools.Excel.XmlMappedRange_ItemType
Public ReadOnly Property Item As XmlMappedRange_ItemType

Property Value

A Range that represents a range at an offset to the XmlMappedRange control.

Examples

The following code example uses the Item property to select the cell that is offset from an XmlMappedRange by three columns and three rows. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void SelectItem()
{
    Excel.Range offsetCell = 
        (Excel.Range)this.CustomerLastNameCell.Item[3, 3];
    offsetCell.Value2 = "Offset cell.";
    offsetCell.Select();
}
Private Sub SelectItem()
    Dim offsetCell As Excel.Range = _
        CType(Me.CustomerLastNameCell.Item(3, 3), Excel.Range)
    offsetCell.Value2 = "Offset cell." 
    offsetCell.Select()
End Sub

Remarks

The Item property is intended to be used with the following parameters.

Parameter Description
RowIndex The index number of the cell you want to access, in order from left to right.
ColumnIndex A number or string that indicates the column number of the cell you want to access, starting with either 1 or "A" for the first column in the range.

If you attempt to use Item without specifying any parameters, Item will get an XmlMappedRange_ItemType object that is part of the Office development tools in Visual Studio infrastructure and is not intended to be used directly from your code.

The RowIndex and ColumnIndex arguments are relative offsets. In other words, specifying a RowIndex of 1 returns cells in the first row of the range, not the first row of the worksheet.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Applies to