n8n Spreadsheet File Node: Read, Write, and Convert Excel and CSV Files [Free Workflow JSON]
The n8n Spreadsheet File node lets you read data from Excel (.xlsx, .xls) and CSV files into workflow items, and write workflow data back out to spreadsheet files — all without leaving n8n. It's the bridge between your automation logic and the spreadsheet-based world most business users still live in.
This guide covers every operation, format gotchas, and three production patterns with a free downloadable workflow JSON.
What the Spreadsheet File Node Does
The Spreadsheet File node has two modes:
- Read from File — parse a binary Excel or CSV file (passed in as a binary property) into structured JSON items, one item per row
- Write to File — take a set of workflow items and serialize them into an Excel or CSV binary file that you can then email, upload to S3, save to disk, or attach anywhere
Supported formats: .csv, .xls, .xlsx, .ods (read only for .ods).
Operations Reference
| Operation | What it does | Key fields |
|---|---|---|
| Read from File | Parses binary spreadsheet → JSON items (1 item per row) | Binary Property, Sheet Name (xlsx), Header Row |
| Write to File | JSON items → binary spreadsheet file | File Format, Sheet Name (xlsx), Binary Property name |
Reading a Spreadsheet
Key fields (Read)
-
Binary Property — the name of the binary property on the input item that contains the file (default:
data). If you're reading a file from disk (Read/Write Files node) or an HTTP download, check what property name the upstream node uses. -
Sheet Name — for multi-sheet
.xlsxfiles, specify which sheet to read. Defaults to the first sheet. -
Header Row — enable this (default: on) to treat the first row as column names. Each output item will have keys matching the header names. Disable if your file has no headers and you want numeric keys (
0,1,2, …). -
Range — optionally limit reading to a cell range (e.g.,
A1:D100). Useful for large files where only a section is relevant. - RAW data — when enabled, all values are returned as strings (no type coercion). Use when you need to preserve leading zeros, formatted dates, or other values that Excel coerces.
Output
Each row becomes one n8n item. Columns become JSON properties. For example, a CSV like:
name,email,plan
Alice,alice@example.com,pro
Bob,bob@example.com,free
Produces two items:
[
{ "name": "Alice", "email": "alice@example.com", "plan": "pro" },
{ "name": "Bob", "email": "bob@example.com", "plan": "free" }
]
Writing a Spreadsheet
Key fields (Write)
-
File Format —
csv,xls, orxlsx. Choosexlsxfor multi-sheet support and better compatibility; choosecsvfor simplicity and universal parsability. -
Sheet Name — name of the sheet in the output
.xlsxfile (ignored for CSV). -
Binary Property — the name of the binary property on the output item where the generated file will be stored (default:
data). Rename it with Move Binary Data if a downstream node expects a different property name. -
Compression — enable for
.xlsxto reduce output file size (recommended for large exports).
Output
The node outputs one item containing a binary property with the generated file. The item's other JSON properties are dropped — you get the file, not the row data.
Gotchas
File must arrive as binary. The Spreadsheet File node does not read file paths — it expects a binary property on the input item. Use the Read/Write Files node, HTTP Request node (with Response Format: File), or a webhook file upload to get binary input first.
Excel date serial numbers. Excel stores dates as numbers (days since 1900-01-01). n8n usually converts these automatically, but if you see large integers where you expect dates, enable RAW data to inspect what's actually stored, then use the DateTime node or a Code node expression to convert.
CSV encoding. n8n defaults to UTF-8. If your CSV is Windows-1252 or Latin-1 (common with older enterprise exports), special characters will corrupt. Pre-process the file with a Code node (Buffer.from(binaryData, 'binary').toString('utf8')) or use a conversion tool before parsing.
Large files slow the workflow. The Spreadsheet File node loads the entire file into memory. For files over ~10 MB or tens of thousands of rows, consider splitting upstream or using a database instead. Use the Split in Batches node downstream to process output items in manageable chunks.
Multi-sheet .xlsx — only one sheet per node. To read multiple sheets from the same file, duplicate the Spreadsheet File node and specify a different sheet name in each instance; merge the outputs downstream.
Write overwrites — no append mode. Every execution of Write to File creates a new file from scratch. There is no native append mode. To append rows to an existing file: read the file, merge the new rows, then write the updated set back.
Pattern 1: Process an Emailed CSV Report
Use case: A vendor emails a daily CSV sales report as an attachment. Parse it, filter rows, and load matching records into a CRM.
Gmail Trigger (attachment)
→ Spreadsheet File [Read: data → items]
→ Filter [plan = "pro"]
→ HTTP Request [POST to CRM API per item]
Key config:
- Gmail Trigger: download attachments → binary property
data - Spreadsheet File Read: Binary Property
data, Header Row enabled - Filter:
{{ $json.plan === 'pro' }}
Free workflow JSON: included in the n8n Workflow Starter Pack (link below).
Pattern 2: Generate and Email a Weekly Report
Use case: Every Monday, pull data from a Postgres table, write it to an Excel file, and email it to a stakeholder list.
Schedule Trigger (Monday 08:00)
→ Postgres [SELECT * FROM weekly_metrics]
→ Spreadsheet File [Write xlsx: items → binary "report"]
→ Move Binary Data [report → attachment]
→ Send Email [attach "attachment"]
Key config:
- Spreadsheet File Write: File Format
xlsx, Sheet NameWeekly Metrics, Binary Propertyreport - Move Binary Data: Move
report→attachment(so Send Email node finds the file) - Send Email: Binary Attachments field =
attachment
Pattern 3: Upload Transformed Data to Google Drive as Excel
Use case: Pull records from an API, enrich them in a Code node, write to .xlsx, and upload to a shared Drive folder.
HTTP Request [GET /api/records]
→ Code node [transform/enrich items]
→ Spreadsheet File [Write xlsx → "data"]
→ Google Drive [Upload file from "data"]
Key config:
- Spreadsheet File Write: File Format
xlsx, Compression enabled - Google Drive Upload: Binary Property
data, Folder ID = target Drive folder
This creates a fresh Excel file on every run — version it by appending {{ $now.format('yyyy-MM-dd') }} to the filename in the Google Drive node.
Free Workflow JSON Download
The complete workflow JSON (CSV parser, Excel report generator, and Drive upload pattern) is available in the n8n Workflow Starter Pack on Gumroad — includes 10+ ready-to-import workflows for common automation tasks.
Quick Reference
| Task | Operation | Format |
|---|---|---|
| Parse CSV attachment | Read from File | csv |
| Parse Excel report | Read from File | xlsx, specify Sheet Name |
| Export data to CSV | Write to File | csv |
| Generate Excel report | Write to File | xlsx |
| Append rows to existing file | Read → merge → Write | any |
Related Guides
- n8n Read/Write Files Node — read binary files from disk before passing to Spreadsheet File
- n8n Move Binary Data Node — rename binary properties between nodes
- n8n DateTime Node — convert Excel date serials to readable dates
- n8n Item Lists Node — deduplicate or sort rows after reading
- n8n Split in Batches Node — process large CSV outputs without memory pressure
Top comments (1)
Are you using the Spreadsheet File node to send weekly Excel reports or parse CSV uploads from clients? Drop your use case below — curious what data pipelines people are building.