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 payload Example
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"}]

Component Properties

Property name Description
File name Specify the file name in case of file output
Append Specifies whether the file is overwritten (Replace) or the data is appended (Append). The value of cp.WriteMode can be one of "Append" , "Overwrite"
SheetName Specifies the name of the sheet on which the data is to be output.
Start Column Specify the first column to output.
Start Row Specify the first row to output.
Output Header Select whether headers are also output when outputting data
Output field order If 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 here 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

Need more help with this?
Join our slack community for help

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.