ExcelScript.DataValidationType enum

データ検証型列挙型を表します。

注釈

/**
 * This sample reads and logs the data validation type of the currently selected range.
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the currently selected range.
  let range = workbook.getSelectedRange();

  // Get the type (`DataValidationType`) of data validation applied to the range.
  let validationType = range.getDataValidation().getType();

  /*
   * Log the data validation type.
   * If the range has a single value, it logs that type.
   * If the range doesn't have data validation applied, it logs "None".
   * If the range has multiple different types of data validation, it logs "Inconsistent" or "MixedCriteria".
   */
  console.log(validationType.toString());
}

フィールド

custom

カスタム データ検証の種類。

date

日付データ検証の種類。

decimal

10 進データ検証型。

inconsistent

不整合は、範囲に一貫性のないデータ検証があることを意味し、異なるセルに異なるルールがあることを示します。

list

リスト データ検証の種類。

mixedCriteria

混合条件は、範囲が一部のセルにデータ検証が存在することを意味しますが、一部のセルには存在しません。

none

None は、範囲にデータ検証がないことを示す値を許可することを意味します。

textLength

テキスト長データ検証の種類。

time

時刻データ検証の種類。

wholeNumber

整数データ検証型。