set_filter
Apply an autofilter to an Excel range and hide rows that don't match specified criteria, using the first row as header. It evaluates criteria over values, preserves formulas, and includes backup and safety checks.
Instructions
Apply an autofilter over a range whose first row is the header, and actually hide the non-matching rows: an .xlsx stores filter CRITERIA, not hidden state, so criteria (a list of {column, op, value}, ops as in query_range, combined as AND) are evaluated here over cached and literal values; a row whose tested cell holds an uncalculated formula stays visible with a warning. A hazardous workbook refuses unless allow_loss is true. Auto-backup to .ks4xl-backups; atomic verified save. Refuses while open in Excel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| sheet | No | ||
| backup | No | ||
| criteria | No | ||
| location | Yes | ||
| allow_loss | No | ||
| verify_com | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||