Search all guides

Reference · Tools

Spreadsheet File node

Read data from spreadsheet files (CSV, XLS, XLSX, ODS, HTML, RTF) into structured items, and write structured items to spreadsheet files.

Action (binary) Core Nodes v1 Binary data

The Spreadsheet File node converts between spreadsheet files and workflow items in both directions — reading CSV, XLS, XLSX, ODS, HTML and RTF into structured items, or writing items out as a spreadsheet. It needs no credentials. A typical build is importing an uploaded XLSX into records and exporting the processed result as CSV.

Works as
Action (binary)
Tool name
spreadsheet_file
Operations
2 — Read From File , Write to File
Parameters
8
Outputs
Output, Error
Credentials
None required

What you can build with Spreadsheet File

  • Parse an uploaded CSV file into individual row items.
  • Convert JSON data into an XLSX Excel file for download.
  • Read an ODS spreadsheet and extract rows as JSON.
  • Export workflow data to a CSV file with custom delimiter.

Overview

The Spreadsheet File tool converts between spreadsheet binary files and JSON data. It has two operations: (1) fromFile reads a binary spreadsheet and outputs one JSON item per row (1-to-many); (2) toFile aggregates all input JSON items into a single spreadsheet binary file (many-to-1). Supports CSV, XLS, XLSX, ODS, HTML, and RTF formats. Uses the xlsx (SheetJS) library for spreadsheet formats and csv-parse for CSV files. No external API calls or credentials required.

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool does not require any credentials.

Operations

OperationValueDescription
Read From FilefromFileReads data from a spreadsheet file
Write to FiletoFileWrites the workflow data to a spreadsheet file

Parameters

Read From File

ParameterTypeRequiredDefaultDescription
Input Binary FieldstringYesdataName of the binary field the spreadsheet file is read from (fromFile) or written to (toFile); case-sensitive.
File Format (inputFileFormat)optionsNoautodetectThe format of the spreadsheet file being read. Autodetect picks CSV or XLSX from the binary MIME type and file extension.
Options: autodetect, csv (comma-separated values), html (HTML Table), ods (openDocument Spreadsheet), rtf (rich Text Format), xls (excel), xlsx (excel)
OptionscollectionNo{}
Options: ascii
— DelimiterstringNo,Set the field delimiter, usually a comma. (shown when /inputFileFormat is csv)
— EncodingoptionsNoutf-8(shown when /inputFileFormat is csv)
Options: ascii, latin1, ucs-2, ucs2, utf-8, utf16le, utf8
— Exclude Byte Order Mark (BOM)booleanNofalseWhether to detect and exclude the byte-order-mark from CSV input if present. (shown when /inputFileFormat is csv)
— Preserve QuotesbooleanNofalseWhether to handle unclosed quotes in CSV fields as part of the field content instead of throwing a parsing error. (shown when /inputFileFormat is csv)
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Include Empty CellsbooleanNofalseWhether to include empty cells when reading from file. They will be filled with an empty string.
— Max Number of Rows to LoadnumberNo-1Stop handling records after the requested number of rows are read. Use -1 to load all rows. (shown when /inputFileFormat is csv)
— RangestringNo—The range to read from the table. If set to a number it will be the starting row. If set to string it will be used as A1-style notation range.
— RAW DatabooleanNofalseWhether to return RAW data, instead of parsing it.
— Read As StringbooleanNofalseIn some cases and file formats, it is necessary to read as string to ensure special characters are interpreted correctly.
— Sheet NamestringNoSheetName of the sheet to read from in the spreadsheet. If not set, the first one will be chosen.
— Starting LinenumberNo0Start handling records from the requested line number. Starts at 0. (shown when /inputFileFormat is csv)
— Skip Records With ErrorsfixedCollectionNo{"value":{"enabled":false,"maxSkippedRecords":-1}}(shown when /inputFileFormat is csv)
— — EnabledbooleanNofalseWhether to skip records with errors when reading from file.
— — Max Skipped RecordsnumberNo-1The maximum number of records that can be skipped. Set to -1 to remove limit.

Write to File

ParameterTypeRequiredDefaultDescription
File Format (outputFileFormat)optionsNoxlsxThe spreadsheet format to write the file as.
Options: csv (comma-separated values), html (HTML Table), ods (openDocument Spreadsheet), rtf (rich Text Format), xls (excel), xlsx (excel)
Put Output File in FieldstringYesdataName of the binary field the spreadsheet file is read from (fromFile) or written to (toFile); case-sensitive.
OptionscollectionNo{}
Options: ascii
— CompressionbooleanNofalseWhether compression will be applied or not. (shown when /outputFileFormat is xlsx, ods)
— File NamestringNo—File name to set in binary data. Defaults to “spreadsheet.”.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /outputFileFormat is ods, xls, xlsx)

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently (used for fromFile operation).

Output Data

Both operations change item cardinality — in opposite directions.

Read From File — one output item per row. Each input item carrying a spreadsheet produces as many output items as the file has rows. Output items carry JSON only; binary data is not forwarded, so the source file does not travel past this node.

With Header Row on (the default), each output item is the row keyed by its column headers:

{
  "orderId": "A-1043",
  "customer": "Acme Ltd",
  "total": 249.5
}

With Header Row off, the row is emitted as an array under a single field:

{
  "row": ["A-1043", "Acme Ltd", 249.5]
}

A file that yields no rows produces no output item for that input, and that is not an error. Empty cells are omitted from the row object unless Include Empty Cells is on, so test for a field’s presence rather than assuming every row has the same keys.

Write to File — exactly one output item for the whole node run. Every input item becomes a row and the node emits a single item whose JSON is empty ({}) and whose binary holds the finished spreadsheet, stored under the name given by Put Output File in Field. Its file name is the Options → File Name value, or spreadsheet.<format> when that is empty, and the MIME type matches the chosen format. Because the JSON is empty, carry anything you still need past this node on a separate branch.

Example Configuration

Read a CSV:

{
  "type": "spreadsheet_file",
  "parameters": {
    "operation": "fromFile",
    "binaryPropertyName": "data",
    "fileFormat": "csv",
    "maxConcurrency": 5,
    "options": {
      "delimiter": ",",
      "encoding": "utf-8",
      "headerRow": true,
      "includeEmptyCells": false,
      "readAsString": false
    }
  }
}

Read a named sheet and a cell range from an Excel workbook:

{
  "type": "spreadsheet_file",
  "parameters": {
    "operation": "fromFile",
    "binaryPropertyName": "file",
    "fileFormat": "xlsx",
    "maxConcurrency": 10,
    "options": {
      "headerRow": true,
      "sheetName": "Data",
      "range": "A1:Z100",
      "includeEmptyCells": true
    }
  }
}

Autodetect the format and tolerate a few malformed rows:

{
  "type": "spreadsheet_file",
  "parameters": {
    "operation": "fromFile",
    "binaryPropertyName": "spreadsheet",
    "fileFormat": "autodetect",
    "options": {
      "headerRow": true,
      "rawData": false,
      "skipRecordsWithErrors": {
        "value": {
          "enabled": true,
          "maxSkippedRecords": 10
        }
      }
    }
  }
}

Write a CSV:

{
  "type": "spreadsheet_file",
  "parameters": {
    "operation": "toFile",
    "binaryPropertyName": "output",
    "fileFormat": "csv",
    "options": {
      "fileName": "export.csv",
      "headerRow": true
    }
  }
}

Write a compressed Excel workbook with a named sheet:

{
  "type": "spreadsheet_file",
  "parameters": {
    "operation": "toFile",
    "binaryPropertyName": "excelFile",
    "fileFormat": "xlsx",
    "options": {
      "fileName": "report.xlsx",
      "headerRow": true,
      "sheetName": "Results",
      "compression": true
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool converts spreadsheet files to and from structured items. It is ideal when you need to read rows from a CSV, XLS, XLSX, ODS, HTML, or RTF file, or when you need to write structured data into one of these formats. The tool produces either structured items from a file or a new spreadsheet file from structured items.

Behavior notes

  • Autodetect only distinguishes CSV. A file is treated as CSV when its MIME type says so (or it is plain text named .csv); everything else is handed to the spreadsheet reader, which covers XLS, XLSX, ODS, HTML and RTF. Set File Format explicitly when a CSV arrives with an unhelpful MIME type.
  • Several read options are CSV-only. Delimiter, Encoding, Exclude BOM, Preserve Quotes, Max Number of Rows to Load, Starting Line and Skip Records With Errors are ignored on XLS/XLSX/ODS/HTML/RTF. Use Range to limit rows in those formats instead.
  • Sheet Name must match exactly. Reading a workbook with a sheet name that is not present fails the item and names the sheet; leave it at the default to take the first sheet.
  • Skipping bad rows is opt-in and capped. Turn on Skip Records With Errors → Enabled to keep parsing past malformed rows; set Max Skipped Records to fail once too many have been skipped.
  • Write collects the whole branch. Everything that reaches the node in one run goes into one file, so filter and sort upstream — there is no per-item file. To produce one file per group, run the node once per group.

Frequently asked questions

How does format autodetection work?

It only distinguishes CSV: a file is treated as CSV when its MIME type says so, or it is plain text named `.csv`. Everything else goes to the spreadsheet reader, which covers XLS, XLSX, ODS, HTML and RTF.

When should I set the format explicitly?

When a CSV arrives without a helpful MIME type or extension, since autodetect will otherwise hand it to the spreadsheet reader.

Can it write files as well as read them?

Yes — items can be written out to a spreadsheet file as binary, ready to attach or store.

Does it need credentials?

No, it is a local conversion.

Build with the Spreadsheet File node

Drop it into a workflow, wire it to an agent, or call it on a schedule.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.