Skip to content
本页内容

Orientation (属性)

返回或设置一个 XlOrientation 值,它代表文本方向。

示例

python
#本示例为A1单元格添加文本,并显示A1单元格文本方向是否为文字水平排列
def test():
    Range("A1").Value2 = "示例文本1"
    print(Range("A1").Style.Orientation == xlHorizontal)
python
#本示例将B1单元格文本方向设置为向下排列
def test():
    Range("B1").Style.Orientation = xlDownward