How can I add 4 empty lines to a CSV file?

Hi,

I have a CSV file created with the Create CSV file module. Is there a way to add 4 empty lines below the titles?

Any help would be appreciated

Hi. I think you can’t add empty rows in the CSV. You must add at least one column value to the row be valid.


Thanks, Helio!
Wemakefuture
If you have questions reach out :wink:

1 Like

@mhebrero,

Not sure of the use case and also although it doesn’t make sense to have empty rows after CSV but what you can do is after the CSV module is done creating the CSV, you can utilize the replace function that will basically replace the last header with a newline,

{{replace(4.csv; lastheadername; lastheadername + (newline + newline + newline + newline))}}

It is not recommended but if you need it you can just do this, just make sure that the lastheadername is not anywhere in the CSV body, you can possible chain multiple header name there to make sure that it is unique. And, in the second part of the function you need to use the same header name and basically replace it with header names + 4 newlines.

1 Like