Compartilhar via


Propriedade XmlMappedRange.Parent

Obtém Microsoft.Office.Interop.Excel.Worksheet que representa a planilha que contém o controle de XmlMappedRange .

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

Sintaxe

'Declaração
ReadOnly Property Parent As Object
Object Parent { get; }

Valor de propriedade

Tipo: System.Object
Microsoft.Office.Interop.Excel.Worksheet que representa a planilha que contém o controle de XmlMappedRange .

Exemplos

O exemplo de código usa a propriedade de Parent para exibir o nome de Microsoft.Office.Interop.Excel.Worksheet pai de XmlMappedRange. Este exemplo de código a seguir pressupõe que a planilha atual contiver XmlMappedRange chamado 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);
}

Segurança do .NET Framework

Consulte também

Referência

XmlMappedRange Interface

Namespace Microsoft.Office.Tools.Excel