Excel AI icon

Excel AI

Perform CRUD operations on Excel files with AI Agent support

Row → Filter Rows

AI-generated

Summary

Reads and returns rows from a worksheet that match specified conditions, with an option to include row numbers.

Inputs

  • Input Mode — How to provide the Excel file: 'File Path' to use a file from the file system or 'Binary Data' to use a binary property.
  • File Path (required) — Absolute path to the Excel file (required when Input Mode is File Path).
  • Binary Property (required) — Name of the binary property containing the Excel file (required when Input Mode is Binary Data).
  • Sheet Name — Name of the worksheet to operate on. If not specified, the first worksheet will be used.
  • Filter Conditions — Conditions to filter rows on. Each condition includes a Field Name (column), Operator (e.g., equals, contains), and Value. Supports multiple conditions.
  • Condition Logic — Logic to apply to conditions: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.
  • Include Row Number — Whether to include a _rowNumber field in the output with the row's index. Defaults to true.

Output shape

a list of items, each containing a JSON object representing a matching row with optional _rowNumber field

Only data rows (excluding the header row) are included. If no conditions are specified, all data rows are returned. The operation is read-only and does not modify the file.

Examples

Example 1: Filter a file-based spreadsheet for rows where the 'Status' column equals 'Active'

Input Mode: File Path, File Path: /data/sheet.xlsx, Filter Conditions: Field='Status', Operator='equals', Value='Active', Condition Logic: and, Include Row Number: true

Example 2: Filter binary data for rows where 'Department' contains 'Sales' using OR logic

Input Mode: Binary Data, Binary Property: data, Filter Conditions: Field='Department', Operator='contains', Value='Sales', Condition Logic: or, Include Row Number: false

Links

Discussion