XmlMappedRange.Orientation 属性

获取或设置一个指定文本方向的值。

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

语法

声明
Property Orientation As Object
    Get
    Set
Object Orientation { get; set; }

属性值

类型:System.Object
一个 -90 至 90 度范围内的整数,指定文本方向。

示例

下面的代码示例使用 Orientation 属性在 XmlMappedRange 中显示垂直文本。 此代码示例假定当前工作表包含一个名为 CustomerLastNameCell 的 XmlMappedRange

Private Sub DisplayVerticalText()
    Me.CustomerLastNameCell.Value2 = "This text is vertical."
    Me.CustomerLastNameCell.Orientation = -90
End Sub
private void DisplayVerticalText()
{
    this.CustomerLastNameCell.Value2 = "This text is vertical.";
    this.CustomerLastNameCell.Orientation = -90;
}

.NET Framework 安全性

请参见

参考

XmlMappedRange 接口

Microsoft.Office.Tools.Excel 命名空间