XmlMappedRange.Top 属性

获取从行 1 的顶部到 XmlMappedRange 控件的上边缘之间的距离(以磅为单位)。

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

语法

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

属性值

类型:System.Object
从行 1 的顶部到 XmlMappedRange 控件的上边缘之间的距离(以磅为单位)。

备注

该值作为双精度值返回。

示例

下面的代码示例使用 Left 和 Top 属性显示从列 A 的左边缘到 XmlMappedRange 的左边缘之间的距离,以及从行 1 的顶部到 XmlMappedRange 的上边缘之间的距离。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

Private Sub DisplayLeftAndTop()
    MsgBox("The left border of CustomerLastNameCell is at " & _
        Me.CustomerLastNameCell.Left & " and the top is at " & _
        Me.CustomerLastNameCell.Top & ".")
End Sub
private void DisplayLeftAndTop()
{
    MessageBox.Show("The left border of CustomerLastNameCell is at " +
    this.CustomerLastNameCell.Left + " and the top is at " +
    this.CustomerLastNameCell.Top + ".");
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间