Adding header to exported CSV

0
Hello!I am using CSV module "Write next line" Java action to download a CSV file, however I want to add a header to each column.Any idea on how to do this?Thanks in advance!
asked
1 answers
0

Hello Helga,
You need to write the header as the first line yourself before writing the actual data rows.

Create one object of the same non-persistent entity that you use for the “Write next line” Java action and set its attributes to your desired column names.

For example:

C01_Name = 'Name'

C02_Email = 'Email'

C03_Department = 'Department'

C04_Status = 'Status'

Then call “Write next line” once with this header object before entering the loop that writes the actual data.
Kindly accept this solution if it helps.
Warm regards

answered