Hi Team,
I have an excel cell with LastName, FirstName.
I need to get it in FirstName LastName as shown below.
Using keystrokes, i have achieved this, Is there any other possible way to achieve it.
PS:I have around 10k rows.
Hi Team,
I have an excel cell with LastName, FirstName.
I need to get it in FirstName LastName as shown below.
Using keystrokes, i have achieved this, Is there any other possible way to achieve it.
PS:I have around 10k rows.
maybe a LINQ helps you
(From d In YourDataTableVar.AsEnumerable
Let nn = String.Join(" “, d(“Names”).toString.Trim.Split(”,"c).Reverse)
Select dtFormated.Rows.Add({nn})).CopyToDataTable
Sure we can do some finetunings if it is needed. Have a critical chec on middle names e.g
Paul Van Dyck will result to Dyck Van Paul but the Family Name is Van Dyck
Thank you, any sample bot please?
In my scenario, we dont have any middle names.
share a excel with some sample names with me and i can work out a demo bot
Thank you, Could you please explain me what it is doing.
(From d In dtData.AsEnumerable
Let nn = String.Join(" “, d(“Names”).toString.Trim.Split(”,"c).Reverse)
Let ra = {d(0),d(1),nn}
Select dtResult.Rows.Add(ra)).CopyToDataTable
how to add the formated result in the next column, instead of replacing? it
Thank you somuch.
how to add the formated result in the next column, instead of replacing it?
I Got it. Thank you.
i’m getting space in first for the filtered name.
give a try on trim and replace the Let nn line with below
Let nn = String.Join(" “, d(“Names”).toString.Trim.Split(”,"c).Reverse.Select(Function (x) x.Trim).ToArray)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.