Excel.DataBarConditionalFormat class

Excel の条件付きデータ バーの種類を表します。

Extends

プロパティ

axisColor

軸線の色を表す HTML カラー コード。形式は #RRGGBB (例: "FFA500")、または名前付き HTML 色 (例: "オレンジ") です。 軸が存在しない場合、または軸が設定されていない場合、値は "" (空の文字列) です。

axisFormat

Excel データ バーの軸を決定する方法の表記。

barDirection

データ バー グラフィックの基準となる方向を指定します。

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

lowerBoundRule

データ バーの下限 (および該当する場合はその計算方法) を構成するルール。 ConditionalDataBarRule オブジェクトは、JSON オブジェクトとして設定する必要があります (x.lowerBoundRule.formula = ... ではなく x.lowerBoundRule = {...} を使用)。

negativeFormat

Excel データ バーの軸の左側にあるすべての値の表現。

positiveFormat

Excel データ バーの軸の右側にあるすべての値の表現。

showDataBarOnly

true の場合、データ バーが適用されるセルの値を非表示にします。

upperBoundRule

データ バーの上限値 (および該当する場合はその計算方法) を構成するルール。 ConditionalDataBarRule オブジェクトは、JSON オブジェクトとして設定する必要があります (x.upperBoundRule.formula = ... ではなく x.upperBoundRule = {...} を使用)。

メソッド

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクト、または同じ型の別の API オブジェクトを渡すことができます。

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

toJSON()

API オブジェクトが JSON.stringify() に渡されるときに、より有用な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (次に、JSON.stringify渡されたオブジェクトの toJSON メソッドを呼び出します)。元の Excel.DataBarConditionalFormat オブジェクトが API オブジェクトであるのに対し、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.DataBarConditionalFormatData と型指定) を返します。

プロパティの詳細

axisColor

軸線の色を表す HTML カラー コード。形式は #RRGGBB (例: "FFA500")、または名前付き HTML 色 (例: "オレンジ") です。 軸が存在しない場合、または軸が設定されていない場合、値は "" (空の文字列) です。

axisColor: string;

プロパティ値

string

注釈

API セット: ExcelApi 1.6

axisFormat

Excel データ バーの軸を決定する方法の表記。

axisFormat: Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint";

プロパティ値

Excel.ConditionalDataBarAxisFormat | "Automatic" | "None" | "CellMidPoint"

注釈

API セット: ExcelApi 1.6

barDirection

データ バー グラフィックの基準となる方向を指定します。

barDirection: Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft";

プロパティ値

Excel.ConditionalDataBarDirection | "Context" | "LeftToRight" | "RightToLeft"

注釈

API セット: ExcelApi 1.6

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/14-conditional-formatting/conditional-formatting-basic.yaml

await Excel.run(async (context) => {
    const sheet = context.workbook.worksheets.getItem("Sample");
    const range = sheet.getRange("B8:E13");
    const conditionalFormat = range.conditionalFormats
        .add(Excel.ConditionalFormatType.dataBar);
    conditionalFormat.dataBar.barDirection = Excel.ConditionalDataBarDirection.leftToRight;

    await context.sync();
});

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

context: RequestContext;

プロパティ値

lowerBoundRule

データ バーの下限 (および該当する場合はその計算方法) を構成するルール。 ConditionalDataBarRule オブジェクトは、JSON オブジェクトとして設定する必要があります (x.lowerBoundRule.formula = ... ではなく x.lowerBoundRule = {...} を使用)。

lowerBoundRule: Excel.ConditionalDataBarRule;

プロパティ値

注釈

API セット: ExcelApi 1.6

negativeFormat

Excel データ バーの軸の左側にあるすべての値の表現。

readonly negativeFormat: Excel.ConditionalDataBarNegativeFormat;

プロパティ値

注釈

API セット: ExcelApi 1.6

positiveFormat

Excel データ バーの軸の右側にあるすべての値の表現。

readonly positiveFormat: Excel.ConditionalDataBarPositiveFormat;

プロパティ値

注釈

API セット: ExcelApi 1.6

showDataBarOnly

true の場合、データ バーが適用されるセルの値を非表示にします。

showDataBarOnly: boolean;

プロパティ値

boolean

注釈

API セット: ExcelApi 1.6

upperBoundRule

データ バーの上限値 (および該当する場合はその計算方法) を構成するルール。 ConditionalDataBarRule オブジェクトは、JSON オブジェクトとして設定する必要があります (x.upperBoundRule.formula = ... ではなく x.upperBoundRule = {...} を使用)。

upperBoundRule: Excel.ConditionalDataBarRule;

プロパティ値

注釈

API セット: ExcelApi 1.6

メソッドの詳細

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(options?: Excel.Interfaces.DataBarConditionalFormatLoadOptions): Excel.DataBarConditionalFormat;

パラメーター

options
Excel.Interfaces.DataBarConditionalFormatLoadOptions

読み込むオブジェクトのプロパティのオプションを指定します。

返品

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames?: string | string[]): Excel.DataBarConditionalFormat;

パラメーター

propertyNames

string | string[]

読み込むプロパティを指定するコンマ区切りの文字列または文字列の配列。

返品

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): Excel.DataBarConditionalFormat;

パラメーター

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select は読み込むプロパティを指定するコンマ区切りの文字列であり、 propertyNamesAndPaths.expand は読み込むナビゲーションのプロパティを指定するコンマ区切りの文字列です。

返品

set(properties, options)

オブジェクトの複数のプロパティを同時に設定します。 適切なプロパティを持つプレーン オブジェクト、または同じ型の別の API オブジェクトを渡すことができます。

set(properties: Interfaces.DataBarConditionalFormatUpdateData, options?: OfficeExtension.UpdateOptions): void;

パラメーター

properties
Excel.Interfaces.DataBarConditionalFormatUpdateData

メソッドが呼び出されたオブジェクトのプロパティと同型構造のプロパティを持つ JavaScript オブジェクト。

options
OfficeExtension.UpdateOptions

プロパティ オブジェクトが読み取り専用プロパティを設定しようとした場合にエラーを抑制するオプションを提供します。

返品

void

set(properties)

既存の読み込まれたオブジェクトに基づいて、オブジェクトに複数のプロパティを同時に設定します。

set(properties: Excel.DataBarConditionalFormat): void;

パラメーター

返品

void

toJSON()

API オブジェクトが JSON.stringify() に渡されるときに、より有用な出力を提供するために、JavaScript toJSON() メソッドをオーバーライドします。 (次に、JSON.stringify渡されたオブジェクトの toJSON メソッドを呼び出します)。元の Excel.DataBarConditionalFormat オブジェクトが API オブジェクトであるのに対し、 toJSON メソッドは、元のオブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト ( Excel.Interfaces.DataBarConditionalFormatData と型指定) を返します。

toJSON(): Excel.Interfaces.DataBarConditionalFormatData;

返品