SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IFilterable

    Interface indicating the ability to filter data.

    interface IFilterable {
        filter(
            condition?: Input<any>,
            options?: ITransaction.OperationOptions,
        ): Promise<IFilterable>;
    }

    Hierarchy (View Summary)

    Index
    • Filter the range using a condition.

      Parameters

      Returns Promise<IFilterable>

      Resolves once the rows are hidden.

      Examples:

      keep only values greater than or equal to 30:

      sheet.getRange('E:E').filter({
      operator: ICondition.BuiltInOperatorNames.GreaterThanOrEqual,
      param: 30
      });

      Example 2 – function param

      sheet.getRange('E:E').filter(value => value >= 30);
      // or with context: (e.g., to ignore header row)
      sheet.getRange('E:E').filter((value, ctx) => {
      const { rowIndex } = ctx.getCoords();
      return rowIndex > 1 && value >= 30;
      });

      Example 3 – string The expression is parsed using the same rules as user input (e.g., "30" is a number, "=A1*2" is a formula, "40%" is 0.4).

      sheet.getRange('E:E').filter('>= 30');