Skip to content
本页内容

DisplayRightToLeft (属性)

如果指定工作表是从右到左显示(而非从左到右),则为 True。如果对象从左到右显示,则为 Falsebool 类型,可读写。

示例

python
#此示例演示活动工作表是否为从右到左显示
def test():
    print(Application.ActiveSheet.DisplayRightToLeft)
python
#此示例判断活动工作簿每一张工作表是否从左到右显示,并通知用户
def test():
    for i in range(1, Sheets.Count):
        sheet = Application.Sheets.Item(i)
        if sheet.DisplayRightToLeft:
            print(f"工作表 {sheet.Name} 为从右到左显示")
        else:
            print(f"工作表 {sheet.Name} 为从左到右显示")