Excel.ConditionalRangeFormat class

A format object encapsulating the conditional formats range's font, fill, borders, and other properties.

[ API set: ExcelApi 1.6 ]

Extends

Properties

borders

Collection of border objects that apply to the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

fill

Returns the fill object defined on the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

font

Returns the font object defined on the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

numberFormat

Represents Excel's number format code for the given range. Cleared if null is passed in.

[ API set: ExcelApi 1.6 ]

Methods

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.ConditionalRangeFormat object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.ConditionalRangeFormatData) that contains shallow copies of any loaded child properties from the original object.

Property Details

borders

Collection of border objects that apply to the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

readonly borders: Excel.ConditionalRangeBorderCollection;

Property Value

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

context: RequestContext;

Property Value

RequestContext

fill

Returns the fill object defined on the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

readonly fill: Excel.ConditionalRangeFill;

Property Value

font

Returns the font object defined on the overall conditional format range. Read-only.

[ API set: ExcelApi 1.6 ]

readonly font: Excel.ConditionalRangeFont;

Property Value

numberFormat

Represents Excel's number format code for the given range. Cleared if null is passed in.

[ API set: ExcelApi 1.6 ]

numberFormat: any;

Property Value

any

Method Details

load(option)

Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties.

load(option?: string | string[]): Excel.ConditionalRangeFormat;

Parameters

option
string | string[]

A comma-delimited string or an array of strings that specify the properties to load.

Returns

Remarks

In addition to this signature, this method has the following signatures:

load(option?: { select?: string; expand?: string; }): Excel.ConditionalRangeFormat - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load.

load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.ConditionalRangeFormat - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that is passed to it.) Whereas the original Excel.ConditionalRangeFormat object is an API object, the toJSON method returns a plain JavaScript object (typed as Excel.Interfaces.ConditionalRangeFormatData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): Excel.Interfaces.ConditionalRangeFormatData;

Returns