WriteToExcelLocal

Description

The WriteToExcelLocal component can output data in Excel format to a local xlsx file.

The input payload (cv.Payload) can be an array of JSON arrays or an array of JSON Objects. Otherwise, it is converted to a string and output as a single line, single column Excel file.

Input payloadExample
Example JSON array payload[[123, "abc", "xxx"],[456, "def", "yyyy"],[789, "hij", "zzz"]]
Example JSON Object payload[{"field1": 123, "field2": "abc", "field3": "xxx"}, {"field1": 456, "field2": "def", "field3": "yyy"}, {"field1": 789, "field2": "hij", "field3": "zzz"}]
excel-local

Component Properties

Property nameDescription
File nameSpecify the file name in case of file output
AppendSpecifies whether the file is overwritten (Replace) or the data is appended (Append). The value of cp.WriteMode can be one of "Append" , "Overwrite"
SheetNameSpecifies the name of the sheet on which the data is to be output.
Start ColumnSpecify the first column to output.
Start RowSpecify the first row to output.
Output HeaderSelect whether headers are also output when outputting data
Output field orderIf the input payload is a JSON Object, list the field names to be output in the order in which you want them to be output, separated by commas.

The destination of the file without specifying the file path is actmgr/data, but see File Path Handling for how to write a file name that specifies the file path.

how to specify output field order

When the payload of a JSON Object is as follows, an Excel file is output if field3 and field1 are specified in the output field order.

Payload of JSON Object

[{"field1": 123, "field2": "abc", "field3": "xxx"}, {"field1": 456, "field2": "def", "field3": "yyy"}, {"field1": 789, "field2": "hij", "field3": "zzz"}]

Output payload (Excel file)

field3, field1
xxx,123
yyy,456
zzz,789