Hey, I want to add a column to my excel, that contains only the first numbers before “_EP3…”, would you help me to choose the right activity for my problem.
Hi @BlueBird1, welcome to the Community.
→ Add a data table column using the activity Add Column. Let’s say you added a column with the name ‘numData’
→ Now use the following query in the Invoke Code activity to fill the column with the numeric data:
yourDt.AsEnumerable.ToList.ForEach(Sub(row)
row(“numData”) = System.Text.RegularExpressions.Regex.Match(row(“ID”).ToString,”\d+(?=_EP)”).Value
End Sub)
Edit: Output-
Hope this helps,
Best Regards.
You can use the following
- Write cell with formula
=LEFT(A2,FIND("_EP3",A2)-1)
- Autofill range activity
Cheers
Thank you all for helping me
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.