Skip to content

Write CSV

Writes rows to a CSV file that later steps can return, send or store.

@lainstack/data/write-csv · Data

Use Write CSV to turn rows into a CSV file, such as a list of checked shipments to return from an Operation or attach to an email. For a file people open in Excel with dates and a filter ready, use Write Excel.

Good to know:

  • Rows is a List of Records or a Table from an earlier step, such as Select Rows or Parse CSV. The first line holds the column names, then each row is one line, columns in the same order.
  • File name can include values from earlier steps. The .csv ending is added when it’s missing, and characters a file name can’t hold, such as / or :, become _. Left empty, the file is rows.csv.
  • Text is quoted where needed. Text starting with =, +, -, @, a tab or a line break gets a ’ in front, so a spreadsheet shows it instead of running it as a formula. Plain numbers such as -5 are left as they are.
  • Numbers are written as numbers, true and false as TRUE and FALSE, dates and times as ISO text such as 2026-11-14, lists and records as JSON, and a File column as the file’s name. An empty value leaves the field empty.
  • The file is UTF-8 with a byte order mark, so Excel shows accents correctly.
  • A file holds at most 500,000 rows and 50 MiB. Over either, the step fails and writes nothing.
  • File is the CSV file, ready for Returned files, Send email or Write object. Row count is the number of rows written.
Setting Key Type Details
Rows (required) rows Value A List of Records or a Table from an earlier step.
File name fileName Text The .csv ending is added when it’s missing.
Output Path Type
File file Value
Row count rowCount Number

Last updated: