Nodes/ComfyUI XAV Google Sheets/XAV Google Sheets Cell Selector
ComfyUI Node

XAV Google Sheets Cell Selector

Grab One Cell Out of a Spreadsheet Matrix — and Step Through It

By XAV-Games·Created 4 months ago·Updated 4 months ago· 2
XAV Google Sheets Cell Selector
  • table
  • text
row0
col0

Where its sibling hands you the whole spreadsheet as one blob, this node does the thing you actually want most of the time: reach into that blob and pull out a single cell. Feed it the table from XAV Google Sheets Loader, give it a row and a column, and it returns the text sitting in that cell. That's the entire job, and it's a genuinely useful one.

Why you'd reach for it

Nobody reads a spreadsheet into ComfyUI just to admire it. The real workflow is "use one value at a time" - generate from the prompt in cell B13, then the one in B14, then B15. That's the exact pain point the r/comfyui crowd hits when they try to batch-generate from a shared sheet: a loader dumps all the cells on you, but you want one per generation. This node is the iterator-friendly end of that problem. The row index is just an INT, so you convert it to an input, drive it with an incrementing counter, and you've got a batch loop over your prompt list.

How it works

It's a pure lookup with zero network access - all the fetching happened upstream in the Loader. Under the hood it's Python's table[row][col] wrapped in a try/except:

  • In range → returns that cell's text as a string.
  • Out of range → returns an empty string instead of crashing.

That silent-fail branch is a small mercy for batch runs, because it means stepping one past the end of your list doesn't blow up the whole queue. Keep reading for the catch, though.

The inputs and output

  • table - the TABLE output of XAV Google Sheets Loader. It's a custom type that only that node produces, so you can't wire a spreadsheet in from anything else.
  • row / col - integers, both with a minimum of 0, defaults of 0. Indexing is 0-based, so row 0 is the first data row and col 0 is the first column.
  • Output: text, a STRING. Wire it into the core Show Text node to inspect a value, or convert a CLIP Text Encode's text widget to an input and connect this straight in - now your prompt comes from a spreadsheet cell.

One quirk worth knowing: the Loader takes the sheet index (sheet_gid) as a string, but here you index cells with plain integers. Different types, same 0-based world.

Installing it

You're installing the pack once and getting both nodes - this one and the Loader. Same drill as any custom node:

cd ComfyUI/custom_nodes
git clone https://github.com/XAV-Games/ComfyUI-XAV-Google-Sheets.git

Restart ComfyUI. Or ComfyUI Manager → search "XAV Google Sheets" → install. No models to download, no extra pip packages - requests (the only real dependency, used by the Loader) ships with ComfyUI already.

Common issues

  • The 0-based indexing catches everyone once. Your sheet almost certainly has a header row; that header is row 0, so your first real prompt is row 1. Decide whether your counters start at 1 and set defaults accordingly.
  • Out of range is silent, not an error. When you step past the end you get "" - which, fed into a prompt, means you quietly generate from an empty string instead of getting a useful error. If your batch runs past the data, add a stop condition to the counter rather than relying on this.
  • The custom TABLE type locks you to this pack's pair. The loader's output won't plug into any other node's socket; if you need to process the whole matrix rather than pick one cell, the README suggests a Python script node.
  • It's a small, young pack - a single-author MIT project that hit r/comfyui in 2026 with effectively zero traction. That's not a knock on the code (it's ~80 readable lines), but it does mean: no big install base to catch bugs for you. If you want certainty about what a fresh node does before its first run, this one is short enough to skim.

For the full picture - making the sheet public, the sheet_gid field, and the CSV-export mechanism - see the XAV Google Sheets Loader article in this same pack.

CategoryXAV/google

Inputs (3)

NameTypeDefaultDescription
tableTABLE
rowINT0
colINT0

Outputs (1)

NameTypeDescription
textSTRING