ExcelScript.DataBarConditionalFormat interface

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

注釈

/**
 * This script creates data bar conditional formatting on the selected range.
 * The scale of the data bar goes from 0 to 1000.
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the selected range.
  const selected = workbook.getSelectedRange();
  
  // Create new conditional formatting on the range.
  const format = selected.addConditionalFormat(ExcelScript.ConditionalFormatType.dataBar);
  const dataBarFormat: ExcelScript.DataBarConditionalFormat = format.getDataBar();

  // Set the lower bound of the data bar formatting to be 0.
  const lowerBound: ExcelScript.ConditionalDataBarRule = {
    type: ExcelScript.ConditionalFormatRuleType.number,
    formula: "0"
  };
  dataBarFormat.setLowerBoundRule(lowerBound);

  // Set the upper bound of the data bar formatting to be 1000.
  const upperBound: ExcelScript.ConditionalDataBarRule = {
    type: ExcelScript.ConditionalFormatRuleType.number,
    formula: "1000"
  };
  dataBarFormat.setUpperBoundRule(upperBound);
}

メソッド

getAxisColor()

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

getAxisFormat()

Excel データ バーの軸の決定方法を表します。

getBarDirection()

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

getLowerBoundRule()

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

getNegativeFormat()

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

getPositiveFormat()

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

getShowDataBarOnly()

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

getUpperBoundRule()

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

setAxisColor(axisColor)

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

setAxisFormat(axisFormat)

Excel データ バーの軸の決定方法を表します。

setBarDirection(barDirection)

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

setLowerBoundRule(lowerBoundRule)

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

setShowDataBarOnly(showDataBarOnly)

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

setUpperBoundRule(upperBoundRule)

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

メソッドの詳細

getAxisColor()

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

getAxisColor(): string;

戻り値

string

getAxisFormat()

Excel データ バーの軸の決定方法を表します。

getAxisFormat(): ConditionalDataBarAxisFormat;

戻り値

getBarDirection()

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

getBarDirection(): ConditionalDataBarDirection;

戻り値

getLowerBoundRule()

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

getLowerBoundRule(): ConditionalDataBarRule;

戻り値

getNegativeFormat()

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

getNegativeFormat(): ConditionalDataBarNegativeFormat;

戻り値

getPositiveFormat()

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

getPositiveFormat(): ConditionalDataBarPositiveFormat;

戻り値

getShowDataBarOnly()

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

getShowDataBarOnly(): boolean;

戻り値

boolean

getUpperBoundRule()

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

getUpperBoundRule(): ConditionalDataBarRule;

戻り値

setAxisColor(axisColor)

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

setAxisColor(axisColor: string): void;

パラメーター

axisColor

string

戻り値

void

setAxisFormat(axisFormat)

Excel データ バーの軸の決定方法を表します。

setAxisFormat(axisFormat: ConditionalDataBarAxisFormat): void;

パラメーター

戻り値

void

setBarDirection(barDirection)

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

setBarDirection(barDirection: ConditionalDataBarDirection): void;

パラメーター

戻り値

void

setLowerBoundRule(lowerBoundRule)

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

setLowerBoundRule(lowerBoundRule: ConditionalDataBarRule): void;

パラメーター

戻り値

void

setShowDataBarOnly(showDataBarOnly)

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

setShowDataBarOnly(showDataBarOnly: boolean): void;

パラメーター

showDataBarOnly

boolean

戻り値

void

setUpperBoundRule(upperBoundRule)

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

setUpperBoundRule(upperBoundRule: ConditionalDataBarRule): void;

パラメーター

戻り値

void