Compartir a través de


XmlMappedRange.Parent (Propiedad)

Obtiene un objeto Microsoft.Office.Interop.Excel.Worksheet que representa la hoja de cálculo que contiene el control XmlMappedRange.

Espacio de nombres:  Microsoft.Office.Tools.Excel
Ensamblado:  Microsoft.Office.Tools.Excel (en Microsoft.Office.Tools.Excel.dll)

Sintaxis

'Declaración
ReadOnly Property Parent As Object
    Get
Object Parent { get; }

Valor de propiedad

Tipo: System.Object
Objeto Microsoft.Office.Interop.Excel.Worksheet que representa la hoja de cálculo que contiene el control XmlMappedRange.

Ejemplos

En el siguiente ejemplo de código se utiliza la propiedad Parent para mostrar el nombre del objeto Microsoft.Office.Interop.Excel.Worksheet de un control XmlMappedRange. En este ejemplo de código se supone que la hoja de cálculo actual contiene un control XmlMappedRange denominado CustomerLastNameCell.

Private Sub DisplayParentName()
    Dim sheet1 As Excel.Worksheet = _
        CType(Me.CustomerLastNameCell.Parent, Excel.Worksheet)
    MsgBox("The XmlMappedRange is in worksheet: " & sheet1.Name)
End Sub
private void DisplayParentName()
{
    Excel.Worksheet sheet1 = (Excel.Worksheet)this.CustomerLastNameCell.Parent;
    MessageBox.Show("The XmlMappedRange is in worksheet: " + sheet1.Name);
}

Seguridad de .NET Framework

Vea también

Referencia

XmlMappedRange Interfaz

Microsoft.Office.Tools.Excel (Espacio de nombres)