WPS 基础接口 > 表格 API 参考 > FormatConditions > FormatConditions 对象

代表一个区域内所有条件格式的集合。

说明

FormatConditions 集合可以包含多个条件格式。每个格式由一个 FormatCondition 对象代表。

有关条件格式的详细信息,请参阅 FormatCondition 对象。

使用 FormatConditions 属性可返回 FormatConditions 对象。使用 Add 方法可新建条件格式,使用 Modify 方法可更改现有的条件格式。

示例

下例为 E1:E10 单元格添加条件格式。

示例代码
let range2 = Worksheets.Item(1).Range("e1:e10").FormatConditions.Add(xlCellValue, xlGreater, "=$a$1")
    let range3 = range2.Borders
        range3.LineStyle = xlContinuous
        range3.Weight = xlThin
        range3.ColorIndex = 6
    let range4 = range2.Font
        range4.Bold = true
        range4.ColorIndex = 3


请参阅