excel_write_data
Writes a block of cells to an xlsx file (deprecated, use the easy version)
- debug
Straight up front: the pack itself files this one under a "🚫Deprecated🚫" category, so before you build anything around it, go look at excel_write_data_easy - same job, one cell at a time, much less to get wrong. This article is here because you searched the name, so let's cover what it does and why the author probably retired it.
What it does
excel_write_data writes a block of values into a range of cells in an .xlsx file. You give it a pipe- and newline-delimited grid of text in the data field - the node's own docstring gives the example 1|2|3|4 on one line, a|b|c|d on the next - and a start/end row and column range to place it in. That range behavior is the part worth being careful with, because it isn't a single consistent rule: with row_start=2, row_end=3, col_start=2, col_end=5, data fills sequentially starting at row 2/column 2 through row 3/column 5. But with row_start=0, row_end=3, col_start=0, col_end=5, the data only fills up to the cell at row 3/column 5 - the zero start changes what "filling" means. That asymmetry, straight from the author's own example, is exactly the kind of thing that's easy to get backwards on a Friday afternoon, and it's a reasonable guess as to why a simpler node exists now.
Inputs and output
All required, no optional inputs:
- excel_path (STRING, default
excel_file_path.xlsx) - where the file lives. - sheet_name (STRING, default
Sheet1). - row_start, row_end, col_start, col_end (INT) - the range, with the quirk described above.
- data (STRING, multiline) - your pipe-delimited grid.
- debug (STRING, output) - whatever status/result text the node reports back; there's no other output.
Installing it
Search ComfyUI-Apt_Preset in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git and restart. The README's dependency step is "double-click install.bat" - a Windows-first instruction with no requirements.txt visible for other platforms, so on Linux/Mac open that file to see what it installs and replicate it with pip in your ComfyUI venv. Note the README doesn't call out a spreadsheet library (like openpyxl) by name anywhere, even though writing .xlsx files needs one - if this node (or its replacement) errors on a missing module the first time you run it, that's almost certainly it; pip install openpyxl in your ComfyUI environment is the likely fix.
Common issues
The range semantics are the main trap, as covered above - test with a throwaway file and small ranges before pointing this at anything you care about, and double check whether your row_start/col_start are 0 or not, since that flips the behavior.
Second, this node has no path-creation or overwrite guardrails documented anywhere - if excel_path points somewhere that doesn't exist, or sheet_name doesn't match a sheet already in the workbook, expect an error rather than a graceful fallback. Check the debug output; that's the node's only channel for telling you what happened.
And since it's deprecated: if you're starting a new workflow rather than maintaining an old one, skip straight to excel_write_data_easy. It trades the row/column range for a single row/column pair - one cell per call, easy to reason about, and it's an output node so it can sit at the end of a chain without needing to feed anything else.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| excel_path | STRING | excel_file_path.xlsx | — |
| sheet_name | STRING | Sheet1 | — |
| row_start | INT | 0 | — |
| row_end | INT | 3 | — |
| col_start | INT | 0 | — |
| col_end | INT | 5 | — |
| data | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| debug | STRING | — |