主题
TopBottom (属性)
返回或设置 XlTopBottom 枚举的常量之一,该常量决定是从顶端还是从底端开始计算排位。
示例
python
#本示例显示活动工作表上区域 A1:A10 中第二个(Top10)条件格式的TopBottom属性是否为xlTop10Top
def test():
top = ActiveSheet.Range("A1:A10").FormatConditions.Item(2)
print(top.TopBottom == xlTop10Top)
python
#本示例设置第一张工作表上区域 A1:A10 中第一个(Top10)条件格式的TopBottom属性
def test():
top = Worksheets.Item(1).Range("A1:A10").FormatConditions.Item(1)
top.TopBottom = xlTop10Bottom