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.
Please help.
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.
Please help.
Hi
Hope the below steps would help you resolve this
Use a BUILD DATATABLE activity and create a table structure you want with that single column and get the output as dt
Now let’s take like you have the Strinput with all the cell values as shown in message box
Use a assign activity like this
Arr_strinput = Split(strinput.ToString,Environment.NewLine.ToArray(),StringSplitOptions.RemoveEmptyEntries)
Now use a FOR EACH activity and pass the above array variable as input and change the type argument as string
Inside the loop use a ADD DATAROW activity And mention like this in property panel
ArrayRow- {item.ToString}
Datatble as dt
Cheers @Paulina_x
Thank for your replay. I think I did everything according to your instructions but something went wrong.
I found my mistake. Unfortunately your method puts all the names on one cell
and I wanted each name to be in a separate cell
Are you using Add data row activity or not as @Palaniyappan mentioned.?
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