Skip to main content
Version: 4.48.0

Excel Writer

The Excel Writer component allows you to write data into an Excel file (.xlsx).

To use it, specify the columns first by using the Columns input. Then add rows by using the Rows input. When you are done adding rows, use the Release input to write the Excel file.

If you have configured Split at row to a number higher than 0 the file will be written each time the number of rows are equal to the configured value. To write the last lines, you need to trigger the Release input.

Configuration

Path

Full path to where to write the Excel file without the extension. The extension will automatically be added. However, the path can be overwritten by sending { path: "/path/to/file.xlsx" } to the Release input. .In order to access the local filesystem, the XILL4_WORKDIRS environment variable must be set to the path of the directory to be accessed.

Example: C:\Users\Bob\Documents\myReport. The file name is myReport.

Sheet name

Name of the sheet.

Example: Report

Split at row number

Splits the sheet into multiple sheets based on the row number specified. If set to 0 the sheet is not split.

Example: 100000

Inputs

There are multiple inputs to be used in 3 steps:

  1. Columns
  2. Rows
  3. Release

Columns

Use this input to create headers in the sheet. A valid input must be an object containing the columns key (array). This array is populated with objects containing the header and key keys and accepts only the following types: null, string, number,boolean and Date.

Example: the headers will be Name1 and Name2. You need to use the keys for the headers when adding rows.

{
"columns": [
{
"header": "Name1",
"key": "name1"
},
{
"header": "Name2",
"key": "name2"
}
]
}

Rows

Use this input to add rows to the sheet.

The column keys created with the Column input will be used in this input to reference those columns and add values to them. It's not necessary to reference all keys. Columns that aren't referenced stay empty. A valid input must be an object containing the row key. The valid types for any value inside the row object are: null, string, number,boolean and Date.

Example:

{
"row": {
"name1": "example2",
"name2": "example1"
}
}

Release

Writes the Excel file to the configured path or the path in the message when triggered. This input can be triggered manually with a Trigger component or when done adding rows using the Control component.

This input takes any message.

Outputs

There are two outputs:

  • Column output
  • Row output

Column Output

Sends a message when columns are successfully added.

Example:

{
"success": true
}

Row Output

Outputs the incoming message when a row is successfully added.

Example:

	"row": {
"name1": "example2",
"name2": "example1",
}
}