Excel.Interfaces.ConditionalFormatData interface

描述通过调用 "conditionalFormat ()" 返回的数据的接口。An interface describing the data returned by calling "conditionalFormat.toJSON()".

属性

cellValue

如果当前条件格式为 CellValue 类型, 则返回单元格值条件格式属性。Returns the cell value conditional format properties if the current conditional format is a CellValue type. 例如, 设置5到10之间的所有单元格的格式。For example to format all cells between 5 and 10. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

cellValueOrNullObject

如果当前条件格式为 CellValue 类型, 则返回单元格值条件格式属性。Returns the cell value conditional format properties if the current conditional format is a CellValue type. 例如, 设置5到10之间的所有单元格的格式。For example to format all cells between 5 and 10. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

colorScale

如果当前条件格式为色阶类型, 则返回色阶条件格式属性。Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

colorScaleOrNullObject

如果当前条件格式为色阶类型, 则返回色阶条件格式属性。Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

custom

如果当前条件格式为自定义类型, 则返回自定义条件格式属性。Returns the custom conditional format properties if the current conditional format is a custom type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

customOrNullObject

如果当前条件格式为自定义类型, 则返回自定义条件格式属性。Returns the custom conditional format properties if the current conditional format is a custom type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

dataBar

如果当前条件格式为数据栏, 则返回数据条属性。Returns the data bar properties if the current conditional format is a data bar. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

dataBarOrNullObject

如果当前条件格式为数据栏, 则返回数据条属性。Returns the data bar properties if the current conditional format is a data bar. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

iconSet

如果当前条件格式为 IconSet 类型, 则返回 IconSet 条件格式属性。Returns the IconSet conditional format properties if the current conditional format is an IconSet type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

iconSetOrNullObject

如果当前条件格式为 IconSet 类型, 则返回 IconSet 条件格式属性。Returns the IconSet conditional format properties if the current conditional format is an IconSet type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

id

当前 ConditionalFormatCollection 内的条件格式的优先级。The Priority of the Conditional Format within the current ConditionalFormatCollection. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

preset

返回预设条件的条件格式。Returns the preset criteria conditional format. 有关更多详细信息, 请参阅 PresetCriteriaConditionalFormat。See Excel.PresetCriteriaConditionalFormat for more details.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

presetOrNullObject

返回预设条件的条件格式。Returns the preset criteria conditional format. 有关更多详细信息, 请参阅 PresetCriteriaConditionalFormat。See Excel.PresetCriteriaConditionalFormat for more details.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

priority

条件格式集合中当前存在此条件格式的优先级 (或索引)。The priority (or index) within the conditional format collection that this conditional format currently exists in. 更改此设置还会更改其他条件格式的优先级, 以允许进行连续的优先级顺序。Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. 使用负优先级从后开始。Use a negative priority to begin from the back. 优先级大于界限将获取并设置为最大值 (如果为负, 则为最小值) 优先级。Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. 另请注意, 如果您更改优先级, 则必须在该新的优先级位置重新获取该对象的新副本 (如果要对其进行进一步的更改)。Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

stopIfTrue

如果满足此条件格式的条件,则不会有任何低优先级格式应在此单元格上生效。If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. 数值、icon sets 和 colorscales 中的 Null, 因为没有针对这些项的 StopIfTrue 的概念Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

textComparison

如果当前条件格式是文本类型, 则返回特定的文本条件格式属性。Returns the specific text conditional format properties if the current conditional format is a text type. 例如, 设置与单词 "Text" 相匹配的单元格的格式。For example to format cells matching the word "Text". 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

textComparisonOrNullObject

如果当前条件格式是文本类型, 则返回特定的文本条件格式属性。Returns the specific text conditional format properties if the current conditional format is a text type. 例如, 设置与单词 "Text" 相匹配的单元格的格式。For example to format cells matching the word "Text". 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

topBottom

如果当前条件格式为 TopBottom 类型, 则返回 Top/底端条件格式属性。Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. 例如, 设置前 10% 或前10个项目的格式。For example to format the top 10% or bottom 10 items. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

topBottomOrNullObject

如果当前条件格式为 TopBottom 类型, 则返回 Top/底端条件格式属性。Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. 例如, 设置前 10% 或前10个项目的格式。For example to format the top 10% or bottom 10 items. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

type

一种条件格式。A type of conditional format. 一次只能设置一个。Only one can be set at a time. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

属性详细信息

cellValue

如果当前条件格式为 CellValue 类型, 则返回单元格值条件格式属性。Returns the cell value conditional format properties if the current conditional format is a CellValue type. 例如, 设置5到10之间的所有单元格的格式。For example to format all cells between 5 and 10. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

cellValue?: Excel.Interfaces.CellValueConditionalFormatData;

属性值

cellValueOrNullObject

如果当前条件格式为 CellValue 类型, 则返回单元格值条件格式属性。Returns the cell value conditional format properties if the current conditional format is a CellValue type. 例如, 设置5到10之间的所有单元格的格式。For example to format all cells between 5 and 10. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

cellValueOrNullObject?: Excel.Interfaces.CellValueConditionalFormatData;

属性值

colorScale

如果当前条件格式为色阶类型, 则返回色阶条件格式属性。Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

colorScale?: Excel.Interfaces.ColorScaleConditionalFormatData;

属性值

colorScaleOrNullObject

如果当前条件格式为色阶类型, 则返回色阶条件格式属性。Returns the ColorScale conditional format properties if the current conditional format is an ColorScale type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

colorScaleOrNullObject?: Excel.Interfaces.ColorScaleConditionalFormatData;

属性值

custom

如果当前条件格式为自定义类型, 则返回自定义条件格式属性。Returns the custom conditional format properties if the current conditional format is a custom type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

custom?: Excel.Interfaces.CustomConditionalFormatData;

属性值

customOrNullObject

如果当前条件格式为自定义类型, 则返回自定义条件格式属性。Returns the custom conditional format properties if the current conditional format is a custom type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

customOrNullObject?: Excel.Interfaces.CustomConditionalFormatData;

属性值

dataBar

如果当前条件格式为数据栏, 则返回数据条属性。Returns the data bar properties if the current conditional format is a data bar. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

dataBar?: Excel.Interfaces.DataBarConditionalFormatData;

属性值

dataBarOrNullObject

如果当前条件格式为数据栏, 则返回数据条属性。Returns the data bar properties if the current conditional format is a data bar. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

dataBarOrNullObject?: Excel.Interfaces.DataBarConditionalFormatData;

属性值

iconSet

如果当前条件格式为 IconSet 类型, 则返回 IconSet 条件格式属性。Returns the IconSet conditional format properties if the current conditional format is an IconSet type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

iconSet?: Excel.Interfaces.IconSetConditionalFormatData;

属性值

iconSetOrNullObject

如果当前条件格式为 IconSet 类型, 则返回 IconSet 条件格式属性。Returns the IconSet conditional format properties if the current conditional format is an IconSet type. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

iconSetOrNullObject?: Excel.Interfaces.IconSetConditionalFormatData;

属性值

id

当前 ConditionalFormatCollection 内的条件格式的优先级。The Priority of the Conditional Format within the current ConditionalFormatCollection. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

id?: string;

属性值

string

preset

返回预设条件的条件格式。Returns the preset criteria conditional format. 有关更多详细信息, 请参阅 PresetCriteriaConditionalFormat。See Excel.PresetCriteriaConditionalFormat for more details.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

preset?: Excel.Interfaces.PresetCriteriaConditionalFormatData;

属性值

presetOrNullObject

返回预设条件的条件格式。Returns the preset criteria conditional format. 有关更多详细信息, 请参阅 PresetCriteriaConditionalFormat。See Excel.PresetCriteriaConditionalFormat for more details.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

presetOrNullObject?: Excel.Interfaces.PresetCriteriaConditionalFormatData;

属性值

priority

条件格式集合中当前存在此条件格式的优先级 (或索引)。The priority (or index) within the conditional format collection that this conditional format currently exists in. 更改此设置还会更改其他条件格式的优先级, 以允许进行连续的优先级顺序。Changing this also changes other conditional formats' priorities, to allow for a contiguous priority order. 使用负优先级从后开始。Use a negative priority to begin from the back. 优先级大于界限将获取并设置为最大值 (如果为负, 则为最小值) 优先级。Priorities greater than than bounds will get and set to the maximum (or minimum if negative) priority. 另请注意, 如果您更改优先级, 则必须在该新的优先级位置重新获取该对象的新副本 (如果要对其进行进一步的更改)。Also note that if you change the priority, you have to re-fetch a new copy of the object at that new priority location if you want to make further changes to it. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

priority?: number;

属性值

number

stopIfTrue

如果满足此条件格式的条件,则不会有任何低优先级格式应在此单元格上生效。If the conditions of this conditional format are met, no lower-priority formats shall take effect on that cell. 数值、icon sets 和 colorscales 中的 Null, 因为没有针对这些项的 StopIfTrue 的概念Null on databars, icon sets, and colorscales as there's no concept of StopIfTrue for these

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

stopIfTrue?: boolean;

属性值

boolean

textComparison

如果当前条件格式是文本类型, 则返回特定的文本条件格式属性。Returns the specific text conditional format properties if the current conditional format is a text type. 例如, 设置与单词 "Text" 相匹配的单元格的格式。For example to format cells matching the word "Text". 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

textComparison?: Excel.Interfaces.TextConditionalFormatData;

属性值

textComparisonOrNullObject

如果当前条件格式是文本类型, 则返回特定的文本条件格式属性。Returns the specific text conditional format properties if the current conditional format is a text type. 例如, 设置与单词 "Text" 相匹配的单元格的格式。For example to format cells matching the word "Text". 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

textComparisonOrNullObject?: Excel.Interfaces.TextConditionalFormatData;

属性值

topBottom

如果当前条件格式为 TopBottom 类型, 则返回 Top/底端条件格式属性。Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. 例如, 设置前 10% 或前10个项目的格式。For example to format the top 10% or bottom 10 items. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

topBottom?: Excel.Interfaces.TopBottomConditionalFormatData;

属性值

topBottomOrNullObject

如果当前条件格式为 TopBottom 类型, 则返回 Top/底端条件格式属性。Returns the Top/Bottom conditional format properties if the current conditional format is an TopBottom type. 例如, 设置前 10% 或前10个项目的格式。For example to format the top 10% or bottom 10 items. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

topBottomOrNullObject?: Excel.Interfaces.TopBottomConditionalFormatData;

属性值

type

一种条件格式。A type of conditional format. 一次只能设置一个。Only one can be set at a time. 只读。Read-only.

[API 集: ExcelApi 1.6][ API set: ExcelApi 1.6 ]

type?: Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue";

属性值

Excel.ConditionalFormatType | "Custom" | "DataBar" | "ColorScale" | "IconSet" | "TopBottom" | "PresetCriteria" | "ContainsText" | "CellValue"