Nodes/ComfyUI-Apt_Preset/excel_read_easy
ComfyUI Node

excel_read_easy

Pull one cell out of a spreadsheet

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
excel_read_easy
    • data
    excel_pathexcel_file_path.xlsx
    sheet_nameSheet1
    row1
    column1

    This is the node you reach for when you're driving prompts, filenames, or any other value out of a spreadsheet into your ComfyUI graph: give it a row and a column, and it hands back exactly that cell's content as a string. No range logic, no zero-as-sentinel conventions to remember - just one cell in, one string out.

    It's the simplified counterpart to the pack's deprecated excel_read, which reads a whole rectangular range and comes with a fiddlier set of behaviors depending on how you set its start/end coordinates. Unless you genuinely need a multi-cell block in one read, this is the one to build around.

    How it works

    There's nothing hidden here: row and column are both plain 1-indexed integers, and the node returns whatever text is in that exact cell. The obvious use is looping a batch - point this node at row 1 for your first generation, row 2 for the second, and so on, feeding each result into a text encoder or wherever your workflow consumes prompt text. Pair it with excel_search_data if you need to find the right row first rather than knowing the coordinates ahead of time, or with excel_insert_image_easy to write the resulting image back into the same row once it's generated.

    The inputs and outputs that matter

    • excel_path / sheet_name - the file and sheet to read from.
    • row / column (INT, min 1) - the single cell's coordinates, 1-indexed (row 1, column 1 is the top-left cell).
    • Output: data (STRING) - that cell's content.

    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. This node needs a Python .xlsx-reading library (most likely openpyxl) that gets installed as part of the pack's dependency step - if just the excel nodes fail to import while the rest load fine, that's the dependency to check for in the console.

    Common issues & troubleshooting

    Output is empty even though the cell clearly has content. Double-check you're not off by one - row/column are 1-indexed, so the top-left cell is row 1, column 1, not row 0, column 0. A common mistake if you're used to zero-indexed spreadsheet APIs elsewhere.

    File or sheet not found. excel_path and sheet_name are plain strings with no validation shown in the schema - a path that doesn't resolve relative to ComfyUI's actual working directory, or a sheet name that doesn't match exactly (including case), is the most common reason this comes back empty instead of erroring loudly.

    Reading numeric or date cells returns something unexpected. Since the output is typed as STRING regardless of what's in the cell, numbers and dates come through as whatever text representation the underlying read produces - if you need to do math on a number pulled this way, you may need to parse it downstream rather than assuming it arrives as a clean numeric value.

    CategoryApt_Preset/prompt/excel

    Inputs (4)

    NameTypeDefaultDescription
    excel_pathSTRINGexcel_file_path.xlsx
    sheet_nameSTRINGSheet1
    rowINT1
    columnINT1

    Outputs (1)

    NameTypeDescription
    dataSTRING