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