Sample Input String :
• Ronaldo
• Messi
• Bavuma
• Pique
I need to generate a datatable with one column and 4 rows without the bullet point.
Sample Input String :
• Ronaldo
• Messi
• Bavuma
• Pique
I need to generate a datatable with one column and 4 rows without the bullet point.
Use a replace first to replace dots and then use a generate datatable with cav prsing
Cheers
Hi @Tanmay_V_Chetule ,
Thanks for reaching out UiPath Community.
You can follow below steps:
Hope This works for you.
Happy Automation,
@Vinit_Kawle
Hi @Tanmay_V_Chetule
=> Use the below in Assign activity:
inputString= "• Ronaldo
• Messi
• Bavuma
• Pique"
=> Use the below code in Invoke Code activity:
inputString = inputString.Replace("• ", "")
YourDataTable = New System.Data.DataTable("PlayerData")
YourDataTable.Columns.Add("PlayerName", GetType(String))
For Each player In inputString.Split(Environment.NewLine.ToCharArray, StringSplitOptions.RemoveEmptyEntries)
YourDataTable.Rows.Add({player.Trim()})
Next
=> In the Edit Arguments option give in the below way:
Attached the workflow for better understanding:
Sequence1.xaml (9.1 KB)
Hope it helps!!
Hi @Tanmay_V_Chetule ,
You can replace line breaks to spaces
my input/output
regards,
As An alternate (one of many other options)
OR