Share via


XmlMappedRange.Cells Property

Gets a Range that represents the cells in the XmlMappedRange control.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
ReadOnly Property Cells As Range
Range Cells { get; }

Property Value

Type: Range
A Range that represents the cells in the XmlMappedRange control.

Examples

The following code example uses the Cells property to display the cell location of an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub DisplayCellRange()
    Dim range1 As Excel.Range = Me.CustomerLastNameCell.Cells
    MsgBox("CustomerLastNameCell is in range " & _
        range1.Address(ReferenceStyle:=Excel.XlReferenceStyle.xlA1))
End Sub
private void DisplayCellRange()
{
    Excel.Range range1 = this.CustomerLastNameCell.Cells;
    MessageBox.Show("CustomerLastNameCell is in range " +
        range1.get_Address(missing, missing, Excel.XlReferenceStyle.xlA1));
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace