Condividi tramite


Proprietà XmlMappedRange.Parent

Ottiene un oggetto Microsoft.Office.Interop.Excel.Worksheet che rappresenta il foglio di lavoro contenente il controllo XmlMappedRange.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Sintassi

'Dichiarazione
ReadOnly Property Parent As Object
    Get
Object Parent { get; }

Valore proprietà

Tipo: System.Object
Oggetto Microsoft.Office.Interop.Excel.Worksheet che rappresenta il foglio di lavoro contenente il controllo XmlMappedRange.

Esempi

Nell'esempio di codice riportato di seguito viene utilizzata la proprietà Parent per visualizzare il nome dell'oggetto Microsoft.Office.Interop.Excel.Worksheet padre di un controllo XmlMappedRange. Nell'esempio si presuppone che il foglio di lavoro corrente contenga un controllo XmlMappedRange denominato 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);
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

XmlMappedRange Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Excel