Share via


ExcelScript.DateFilterCondition enum

日付フィルターを適用できる、受け入れられるすべての条件を表す列挙型。 フィールドに適用される PivotFilter の種類を構成するために使用します。

注釈

/**
 * This script applies a filter to a PivotTable that filters out rows 
 * that aren't from this month.
 */
function main(workbook: ExcelScript.Workbook) {
  // Get the "Date Recorded" field to filter. 
  // The data in this field must be dates in order for the filter to work.
  const pivot = workbook.getPivotTables()[0];
  const rowHierarchy = pivot.getRowHierarchy("Date Recorded");
  const rowField = rowHierarchy.getFields()[0];

  // Apply the date filter.
  rowField.applyFilter({
    dateFilter: {
      // Setting the condition to `thisMonth` means items that are before or
      // after this month will not be displayed.
      condition: ExcelScript.DateFilterCondition.thisMonth
    }
  });
}

フィールド

after

Date はコンパレータの日付の後です。

必須の条件: {comparator}。 オプションの条件: {wholeDays}

afterOrEqualTo

日付はコンパレータの日付の後または等しい。

必須の条件: {comparator}。 オプションの条件: {wholeDays}

allDatesInPeriodApril

日付は 4 月です。

allDatesInPeriodAugust

日付は 8 月です。

allDatesInPeriodDecember

日付は 12 月です。

allDatesInPeriodFebruary

日付は 2 月です。

allDatesInPeriodJanuary

日付は 1 月です。

allDatesInPeriodJuly

日付は 7 月です。

allDatesInPeriodJune

日付は 6 月です。

allDatesInPeriodMarch

日付は 3 月です。

allDatesInPeriodMay

日付は 5 月です。

allDatesInPeriodNovember

日付は 11 月です。

allDatesInPeriodOctober

日付は 10 月です。

allDatesInPeriodQuarter1

日付は四半期 1 です。

allDatesInPeriodQuarter2

日付は四半期 2 です。

allDatesInPeriodQuarter3

日付は四半期 3 です。

allDatesInPeriodQuarter4

日付は四半期 4 です。

allDatesInPeriodSeptember

日付は 9 月です。

before

Date はコンパレータの日付より前です。

必須の条件: {comparator}。 オプションの条件: {wholeDays}

beforeOrEqualTo

日付がコンパレータの日付の前または等しい。

必須の条件: {comparator}。 オプションの条件: {wholeDays}

between

の間 lowerBoundupperBound 日付。

必須の条件: {lowerBound, upperBound}. 省略可能な条件: {wholeDays, exclusive}.

equals

比較条件に等しい。

必須の条件: {comparator}。 省略可能な条件: {wholeDays, exclusive}.

lastMonth

日付は先月です。

lastQuarter

日付は最後の四半期です。

lastWeek

日付は先週です。

lastYear

日付は最後の年です。

nextMonth

日付は来月です。

nextQuarter

日付は次の四半期です。

nextWeek

日付は来週です。

nextYear

日付は来年です。

thisMonth

日付は今月です。

thisQuarter

日付はこの四半期です。

thisWeek

日付は今週です。

thisYear

日付は今年です。

today

日付は今日です。

tomorrow

日付は明日です。

unknown

DateFilterCondition が不明であるか、サポートされていません。

yearToDate

日付は、現在と同じ年です。

yesterday

日付は昨日です。