Split data in one row to multiple

Hi,

I have problem with a datatable. I have several names in one cell and I need to split them:
I need: 1 name in 1 row.
Below is a picture of my current datatable.

image

Please help.

Hi

Hope the below steps would help you resolve this

  1. Use a BUILD DATATABLE activity and create a table structure you want with that single column and get the output as dt

  2. Now let’s take like you have the Strinput with all the cell values as shown in message box

  3. Use a assign activity like this

Arr_strinput = Split(strinput.ToString,Environment.NewLine.ToArray(),StringSplitOptions.RemoveEmptyEntries)

  1. Now use a FOR EACH activity and pass the above array variable as input and change the type argument as string

  2. Inside the loop use a ADD DATAROW activity And mention like this in property panel

ArrayRow- {item.ToString}
Datatble as dt

Cheers @Paulina_x

2 Likes

@Palaniyappan,

Thank for your replay. I think I did everything according to your instructions but something went wrong.

image

@Palaniyappan,

I found my mistake. Unfortunately your method puts all the names on one cell :frowning:
and I wanted each name to be in a separate cell :frowning:

Are you using Add data row activity or not as @Palaniyappan mentioned.?

1 Like

@ImPratham45

yes.

Check if split operation worked or not. Use write line to print Arr_stinput.count.tostring

If you are getting 1 then split didnt worked.
Then try this split option

Arr_strinput = strinput.Split({vblf},StringSplitOptions.None)

Fine
Can you put the output string from output datatable activity in a writeline activity so that we can see how the value looks like

Pls share the screenshot of the output panel with that output string

Cheers @Paulina_x