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
Get
Range Cells { get; }
Property Value
Type: Microsoft.Office.Interop.Excel.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,
missing, missing));
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.