Nodes/ComfyUI MarkItDown/Excel to Markdown
ComfyUI Node

Excel to Markdown

Spreadsheet cells become Markdown tables — your LLM will thank you

By ciga2011·Created 2 years ago·Updated about a year ago· 9
Excel to Markdown
    • markdown
    source_file

    Spreadsheets are the worst thing to feed an LLM and the best thing to convert to Markdown tables first. That's what this node does: give it an .xlsx path, get every sheet back as Markdown tables. It's the quietest workhorse in the ComfyUI-MarkItDown pack, and if you've ever pasted a CSV into a prompt and watched the model lose its mind over formatting, you already know why it exists.

    How it works

    Like the rest of the pack, Excel2Markdown subclasses the generic MarkItDown node with a whitelist of one extension, .xlsx. markitdown opens the workbook with openpyxl, reads the data into pandas, and renders each sheet as a Markdown table - headers, rows, and columns preserved. Multiple sheets come through one after another, so a multi-tab workbook becomes one long Markdown document with each sheet's table intact. That's the whole trick, and it's a genuinely useful one: structured data stays structured.

    The inputs and outputs that matter

    One input: source_file, a STRING with the absolute path to your .xlsx. One output: markdown, a STRING. That's the entire node. No sheet selection, no row filters - if you only want one tab of a fifty-tab workbook, this isn't the tool; convert and trim the output.

    Why you'd reach for it

    Two words: LLM context. A pricing sheet, a dataset, a budget - as Markdown tables, these read like structured text to a model, which means better answers than dumping the raw binary or a mangled text export. It's also just a nice way to turn a spreadsheet into something diffable and greppable outside of ComfyUI entirely.

    Installing it

    It's one of the nine nodes in ComfyUI-MarkItDown, so install the pack once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ciga2011/ComfyUI-MarkItDown
    

    Restart ComfyUI (or install via Manager, search "ComfyUI MarkItDown"). The Excel support is pure Python from markitdown's dependencies - no models, no GPU, no fuss.

    Gotchas

    Two to remember. Legacy .xls files are rejected - the whitelist is .xlsx only, so convert old workbooks first. And watch your output size: a big sheet becomes a big Markdown string, and if you're feeding it to an LLM node, that string eats your context window fast. If you only need a summary, consider trimming the source data before converting rather than sending the whole workbook.

    CategoryMarkItDown

    Inputs (1)

    NameTypeDefaultDescription
    source_fileSTRING

    Outputs (1)

    NameTypeDescription
    markdownSTRING