Remove space

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 @AsadPathan2665

Try this approach

please refer the xaml

RemoveSpace.xaml (8.1 KB)

Any code calculate the length and replace the space.
Becoz lots of data in Excel file

@AsadPathan2665

You can try this

image

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”)