Remove the CSV writer; add a Text File writer instead.
Insert a StringConcatenator before the writer to create a csv line (comma-separated attribute values) for each feature. Set the concatenated attribute name to "text_line_data".
Add a Creator to create a feature; connect an AttributeCreator to add an attribute named "text_line_data" to the feature, set the value to comma-separated field names followed by one newline character. And then send the feature to the writer.
Note that a value should be surrounded by double quotations before the concatenation if it contains a comma.
I compared a two workbench and the difference is that my writer is saved as a txt file with .txt extension. So no blank line between fields names and data.
If the writer is a text file WITH CSV EXTENSION, it works like your example.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.