Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Insert a row content in a CSV or EXCEL which is extracted using a DATA extraction activity in a workflow

Avatar

Level 1

Hi,

 

I'm trying to insert a new row with content as header and description inside a CSV or Excel sheet using the data extraction.

 

I'm able to insert data as columns, Is it possible to insert a row using a script? 

 

data-extraction.png

 

Thank you!!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

Yes, this is trivial with scripting, e.g. execCommand("sed -i '1s/^/<added text>/'").

The data extraction activity supports column headers though, so this should be unnecessary.

 

Thanks,

-Jon

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

 

Yes, this is trivial with scripting, e.g. execCommand("sed -i '1s/^/<added text>/'").

The data extraction activity supports column headers though, so this should be unnecessary.

 

Thanks,

-Jon

Avatar

Level 3

Hi @satishnagarajan  I've a requirement to insert data as column(header name) since while data extraction even if we select the option to populate first column as header, for blank file the headers are not populating in current campaign version , could you share how you have achieved this? Through script or any other way?