Nodes/ComfyUI_StringOps/读取表格数据🐠meeeyo.com
ComfyUI Node

读取表格数据🐠meeeyo.com

Reading cells out of an .xlsx and into your workflow

By MeeeyoAI·Created 2 years ago·Updated about a year ago· 209
读取表格数据🐠meeeyo.com
  • any
  • STRING
excel_pathpath/to/your/file.xlsx
sheet_nameSheet1
row_range2-3
col_range1-4

ComfyUI is a graph, not a database - which is exactly why people end up driving batch workflows from spreadsheets anyway. If you keep your prompt lists, character sheets, or product data in Excel, ReadExcelData is how you get that data into the graph: point it at an .xlsx file, give it a row range and a column range, and it hands you the cells as one pipe-and-newline-separated string.

It comes from ComfyUI_StringOps, the same small utility pack that ships WriteExcelData (its mirror) and NumberExtractor (its natural downstream). The whole pack is Chinese-market, branded 🐠meeeyo.com, and thin on documentation - the UI description is a WeChat promo - but the Excel nodes are the most distinctive thing it does. Most custom-node packs avoid spreadsheet I/O entirely; this one built it as a core feature.

How it works

Give it four inputs:

  • excel_path - the file path. Absolute path, e.g. /home/user/data/prompts.xlsx (or a Windows path if that's your life).
  • sheet_name - which tab, default Sheet1.
  • row_range - 2-3 (inclusive, 1-based), or a single row like 4.
  • col_range - 1-4 (inclusive, 1-based), or a single column like 2.

It loads the workbook with openpyxl in read-only mode, walks your range, and builds the output: each row's cells joined with |, rows joined with newlines. So a 2-row × 2-col read might give you:

man|photo
woman|illustration

One STRING output. That format is deliberate - pipe-separated rows are exactly what NumberExtractor parses, and the newlines are what TextToList can split. The nodes in this pack are designed to chain.

What to watch out for

The first gotcha is the path: ComfyUI's own file pickers give you input-folder-relative paths, but this node wants a real filesystem path - ReadExcelData does not use ComfyUI's input directory at all. Give it a path ComfyUI's Python process can actually reach, or you'll get a friendly Error: ... string in the output instead of data.

Second, errors don't throw - they come back as a string starting with Error: on the output. That's the pack's style, and it's usually fine, but it means a typo'd sheet name silently produces a string you might feed into a prompt. Check the output once before wiring it to something that matters.

Third, read_only=True with data_only=True means you get cached values, not formulas - if your sheet has formulas, you see the last computed result, which for a batch-runner is usually what you want anyway.

Installing it

ComfyUI Manager → search ComfyUI_StringOps → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git

openpyxl (the only genuinely nonstandard dependency here) is pulled from the pack's requirements.txt, so Manager handles it. No models, nothing heavy.

The honest take

For one-off reads this is more setup than just typing the values in. It earns its keep the moment your data lives in a file that changes - a spreadsheet your client edits, a batch table you regenerate - because you can re-run the whole queue and the values refresh from disk every time (this pack never caches, so it always re-reads). Pair it with NumberExtractor and TextToList and you've got a workable CSV-lite batch pipeline. It won't create files or handle .csv - that's WriteExcelData and a different problem entirely.

CategoryMeeeyo/File

Inputs (5)

NameTypeDefaultDescription
excel_pathSTRINGpath/to/your/file.xlsx
sheet_nameSTRINGSheet1
row_rangeSTRING2-3
col_rangeSTRING1-4
anyopt*

Outputs (1)

NameTypeDescription
STRINGSTRING