xlsx

n8n community node to read, write and style XLSX files entirely in memory (binary in / binary out), inspired by the Google Sheets node.

Package Information

Released: 3 mo ago
Downloads: 290 weeklyĀ /Ā 290 monthly
Latest Version: 0.1.1

Documentation

n8n-nodes-xlsx

Community node for n8n that replicates the functionality of the Google Sheets node, but working
on xlsx files passed in and returned as binary data ($binary), entirely in memory.
No reading or writing to disk: the file comes in as a Buffer, is modified with
exceljs and comes out as a Buffer ready to be saved.

  • Binary in → Binary out: if you pass an existing xlsx it modifies it, otherwise it creates a new one.
  • Data operations Google Sheets style: Append, Upsert, Update, Read, Clear, Delete, Create/List Sheet.
  • Two-level styling: Simple mode (everything from the interface, without writing code) and
    Advanced (exceljs-compatible JSON for complex cases).
  • Multi-sheet: every operation has a Sheet Name parameter.
  • Zero Google/OAuth dependencies.

Installation

From the n8n interface (recommended)

  1. In n8n go to Settings → Community Nodes.
  2. Click Install and enter the package name:
    n8n-nodes-xlsx
    
  3. Confirm. After installation the XLSX node appears in the node palette.

Manual (self-hosted / development)

# in your n8n custom nodes folder (~/.n8n/custom or the project folder)
npm install n8n-nodes-xlsx
# or, locally from source:
git clone <repo> && cd n8n-nodes-xlsx
npm install
npm run build

Then restart n8n. For development you can link the package with npm link.

Requirements

  • Node.js ≄ 18.10
  • n8n ≄ 1.x (community node API version 1)
  • No credentials: the node does not connect to external services.

Operations overview

Operation What it is for Modifies the binary? Output
Append Adds rows at the bottom of the sheet Yes Updated binary
Append or Update (Upsert) Updates the rows with a matching key, adds the others Yes Updated binary
Update Updates only the rows with a matching key Yes Updated binary
Read Rows Reads the rows as JSON (with optional filters) No (unchanged) JSON items + unchanged binary
Clear Empties a range or all the sheet data Yes Updated binary
Delete Rows Deletes rows and shifts the following ones up Yes Updated binary
Delete Columns Deletes columns and shifts the following ones left Yes Updated binary
Create Sheet Adds a new sheet to the workbook Yes Updated binary
List Sheets Returns the sheet names as JSON No JSON items (one per sheet)

Parameter details, input/output examples and the schema of the fields visible in the UI:
šŸ‘‰ docs/operations.md

Complete styling guide (Simple presets + copyable Advanced examples):
šŸ‘‰ docs/styling.md

End-to-end example workflows:
šŸ‘‰ docs/recipes.md


How the binary works (important)

These three settings live under Options in the node panel (click Add Option). The defaults
work out of the box, so most workflows never need to touch them.

  • Input Binary Field (default data): name of the binary field that contains the incoming
    xlsx. The node looks for the first input item that has this field and uses it as the
    starting workbook. If no item has that binary, a new workbook is created from scratch.
  • Output Binary Field (default data): name of the outgoing binary field that carries
    the resulting xlsx.
  • Output File Name (default spreadsheet.xlsx): file name attached to the output binary.

JSON data convention

The data follows the n8n convention: an array of objects, where the keys = column names
(first row of the sheet) and the values = cells. Example:

[
  { "id": 1, "name": "Ada",   "role": "engineer" },
  { "id": 2, "name": "Grace", "role": "admiral"  }
]

Becomes:

| id | name  | role     |
|----|-------|----------|
| 1  | Ada   | engineer |
| 2  | Grace | admiral  |

Development

npm install          # install the dependencies
npm run build        # compile TypeScript into dist/ and copy the assets (icon, metadata)
npm test             # run the jest suite (operations + styling)
npm run lint         # type-check without emitting files

Bonus: migration from Google Sheets

The convertGoogleSheetsConfig function (in nodes/Xlsx/lib/convert.ts) translates the configuration
of the native Google Sheets node into the equivalent parameters of this node (maps operation,
sheetName, columnToMatchOn, range). Useful for migrating existing workflows.

License

MIT

Discussion