Nodes/ComfyUI-Apt_Preset/excel_insert_image_easy
ComfyUI Node

excel_insert_image_easy

Drop a generated image straight into a spreadsheet cell

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
excel_insert_image_easy
  • image
  • debug
excel_pathexcel_file_path.xlsx
sheet_nameSheet1
row1
column1
img_height256
debug_outputfalse

If you're building a spreadsheet that pairs prompts with the images they generated - a build sheet, a QA log, a client deliverable - this is the node that closes the loop. It takes an IMAGE straight off your ComfyUI graph and drops it into a specific cell, no saving to disk and pointing at a file path first. That's the whole improvement over its deprecated sibling, excel_insert_image, and it's the reason to reach for this one by default.

How it works

Wire in an image, tell it which row and column to target, and it writes that image into the spreadsheet at that cell, sized to img_height. Unlike the older version, there's no range-tiling mode and no zero-as-sentinel behavior to remember - one image, one cell, straightforward. Since is_output_node is true, it behaves like a Save Image node: it's a valid endpoint for your graph that does its work as a side effect (writing into the .xlsx file) rather than needing anything downstream, though the debug output is there if you want to chain something off it or just confirm the write happened.

The natural pattern: generate an image, feed it here targeting a row that increments per batch item, and after N runs you've got a spreadsheet with one row per generation and the actual output image embedded next to whatever metadata you're also tracking in that row (prompt text via excel_read_easy or similar, for instance).

The inputs and outputs that matter

  • excel_path / sheet_name - which file and sheet.
  • row / column (INT, min 1, 1-indexed) - the single target cell.
  • img_height (64–2048, default 256) - the inserted image's display size in the sheet.
  • image (IMAGE, required) - the image itself, wired directly from your graph.
  • debug_output (optional BOOLEAN, default false) - turn this on if you want the debug output populated with detail for troubleshooting a failed write; leave it off otherwise.
  • Output: debug (STRING).

How to install it

Bundled with the full pack. Via ComfyUI Manager: search "ComfyUI-Apt_Preset" → Install → restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

Windows: run install.bat from the cloned folder through ComfyUI's embedded Python. Linux/Mac: activate your ComfyUI venv and install requirements from that folder by hand. Restart ComfyUI. The excel nodes need a Python .xlsx-writing library (most likely openpyxl) pulled in during that step - if this node specifically errors on load while the rest of the pack works fine, that's the dependency to check the console for.

Common issues & troubleshooting

Nothing appears in the spreadsheet after running. Check that excel_path points at a file that actually exists and is writable - this node inserts into an existing workbook, it doesn't create a new one from scratch. If the file's open in Excel elsewhere on Windows, the write can also fail silently or error depending on how the underlying library handles a locked file.

Image is inserted but at the wrong size relative to your cells. img_height sets pixel height directly; it doesn't auto-scale to fit whatever your column width or row height already is, so a mismatch between img_height and your sheet's existing row height is a formatting choice you need to set on both ends, not something this node reconciles for you.

Want to verify the write actually happened. Flip debug_output on and check the debug output - it's the fastest way to confirm success or see an error message without opening the spreadsheet file separately after every run.

CategoryApt_Preset/prompt/excel

Inputs (7)

NameTypeDefaultDescription
excel_pathSTRINGexcel_file_path.xlsx
sheet_nameSTRINGSheet1
rowINT1
columnINT1
img_heightINT25664–2048
imageIMAGE
debug_outputoptBOOLEANfalse

Outputs (1)

NameTypeDescription
debugSTRING