Hi everyone
No. Of rows in my excel file.
Column name is Narration.
In Narration column
Coral plus Drcard Joinfee+GST
If length is greater than 30. Remove space . between Drcard and Joinfee
Hi everyone
No. Of rows in my excel file.
Column name is Narration.
In Narration column
Coral plus Drcard Joinfee+GST
If length is greater than 30. Remove space . between Drcard and Joinfee
Any code calculate the length and replace the space.
Becoz lots of data in Excel file
You can try this
dt_Result=
(
From row In dt_Data
Let gl = Row("Narration").ToString.Length > 30
Let n = If(gl, Regex.Replace(Row("Narration").ToString, "(?<=Drcard) (?=Joinfee)", ""), Row("Narration").ToString)
Select dt_Result.Rows.Add(row.ItemArray.Skip(1).Prepend(n).ToArray)
).CopyToDataTable
Xaml for reference
RemoveSpace.xaml (10.3 KB)
Hi @AsadPathan2665 ,
You Can try using REGex Method
Install Package
System.Text.RegularExpressions
Use Matches activity
and Try using
Drcard\sJoinfee
Please try and let me know
Thanks,
Kishor Gy
And you can use another method
Strinput.replace(“Drcard Joinfree”,“DrcardJoinfree”)