I look for a method that can add a blank line between field names and data into CSV Writer.
Any idea?
Thanks an advance.
FarFar
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
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.