Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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?