Headers in spreadsheet file

Hello! I would like to create workflow which gets some data from array of arrays and converts it to csv.
For a test I’m using simple function node with such code:

return [{json: ['a', 'b', 'c', 'd', 'e']},{json:['a1', 'b1', 'c1', 'd1', 'e1']}]

Then I’m using a “spreadsheet file” node which gives a result like this:

How can I specify csv headers in that file and get rid of indices at first row?

Thanks :slight_smile:

Having an array directly under the property json is not “allowed”. It is supposed to be always an object. The documentation about that can be found here:

Anyway if the data is in the format you did describe you would have to convert it into the correct format. Here an example how it can be done:
(You just have to define the name of the headers in the Convert-Node)

2 Likes