查找表格数据🐠meeeyo.com
Search an Excel sheet from inside a workflow and get the cell's row and column back
- any
- STRING
- INT
- INT
The whole reason this pack stands out is the Excel integration - most string packs are allergic to spreadsheets. FindExcelData (查找表格数据 - "find table data") is the search half of that story: you give it a .xlsx file, a sheet name, and a value to look for, and it scans every cell for a match. It returns the matching cell's contents plus the row and column as INTs - so you can locate a record and then hand its coordinates to the pack's other Excel nodes for a follow-up read.
How it works
Four inputs: excel_path (the file), sheet_name (default Sheet1), search_content (what you're hunting for), and search_mode, a two-choice dropdown: 精确查找 (exact match) or 模糊查找 (fuzzy/contains match). Exact requires the cell value to equal your search string; fuzzy matches any cell that contains it. Both compare against the string form of the cell value, so numbers get compared as text too - 42 and "42" behave the same.
Outputs are three:
STRING- every match, one per line, formatted assheet|row|col|value. Multiple hits all come back, joined with newlines.INT- the row of the last match found (the scan is row-by-row, column-by-column).INT- the column of that last match.
So the row/col ints always describe the final match in the string list, not the first - if your search has several hits, the string output is authoritative and the ints point at the last one. If nothing is found, you get "No results found.", None, None. Missing file or bad path returns a clear error string on the first port.
Why you'd reach for it
Batch configuration driven by a spreadsheet - the author's clear use case. Your prompts, sizes, seeds, or parameters live in an Excel sheet; this finds the row that matches your current key, and you use the coordinates (or the string output) to pull the related data. Combined with the pack's ReadExcelData / WriteExcelData siblings, it turns a spreadsheet into the control plane for a ComfyUI batch.
Install
Part of ComfyUI_StringOps - the Excel nodes need openpyxl, which is in the pack's requirements.txt and installed with it:
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
Restart. Or ComfyUI Manager → "ComfyUI_StringOps". No model downloads. Chinese UI (查找表格数据) with the 🐠meeeyo.com branding.
Common issues
Exact vs fuzzy is the first decision that bites: exact match on cat won't find the cat, and fuzzy on cat will find category - same search, wildly different row results, so choose deliberately. The row/col outputs being the last match rather than the first surprises people scanning a column of duplicates - trust the string output for the full picture. And .xlsx only: this uses openpyxl, which doesn't read legacy .xls files - save as .xlsx first. Also, formula cells: values are read with data_only=True, so a cell whose formula hasn't been calculated in Excel can come back empty. Small caveats, but they're the ones that actually show up.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| excel_path | STRING | path/to/your/file.xlsx | — |
| sheet_name | STRING | Sheet1 | — |
| search_content | STRING | 查找内容 | — |
| search_mode | COMBO | 精确查找 | 2 options: 精确查找, 模糊查找 |
| anyopt | * | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| INT | INT | — |
| INT | INT | — |