Skip to content
本页内容

Interior (属性)

返回一个 Interior 对象,它代表指定对象的内部。

示例

python
#本示例将活动工作表上区域 A1:A10 中第一个条件格式内部的颜色设置为红色
def test():
    formatCondition = ActiveSheet.Range("A1:A10").FormatConditions.Item(1)
    formatCondition.Interior.ColorIndex = 3
python
#本示例设置活动工作表上区域 A1:A10 中第一个条件格式内部的主题颜色
def test():
    formatCondition = ActiveSheet.Range("A1:A10").FormatConditions.Item(1)
    formatCondition.Interior.ThemeColor = xlThemeColorLight2