XmlMappedRange.Parent 属性

获取一个 Microsoft.Office.Interop.Excel.Worksheet,它表示包含 XmlMappedRange 控件的工作表。

命名空间:  Microsoft.Office.Tools.Excel
程序集:  Microsoft.Office.Tools.Excel(在 Microsoft.Office.Tools.Excel.dll 中)

语法

声明
ReadOnly Property Parent As Object
    Get
Object Parent { get; }

属性值

类型:System.Object
一个 Microsoft.Office.Interop.Excel.Worksheet,表示包含 XmlMappedRange 控件的工作表。

示例

下面的代码示例使用 Parent 属性显示 XmlMappedRange 的父 Microsoft.Office.Interop.Excel.Worksheet 的名称。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

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);
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间