Remove spaces from column value

im filtering datatable but in one column’s value has spaces

i used trim, it didnot help


It will work only for space located at the start or end

that column value is fixed
so i have used Filterdatatable in which
“Subject”= in_Subject.Trim

in_Subject has value “English”

The value English in Excel contains spaces like this "English " , so BOt doesnt give accurate results

try using


no , it didnt help

@Ananya1 Can you maybe show screenshots of how you are performing the operation ? You might need to Iterate the Datatable using a For Each Row and make a Trim Operation for each of the Column’s Values

1 Like

Hi Ananya
please give me excel file and show me where you want remove spaces

Hi @Ananya1

Even the input has no spaces ie in_Subject has no spaces but when u compare with excel columns who cell values have whitespacing and end or start of words. Then the filter datatable activitiy will return empty values

So as told by @supermanPunch
u need to make a sequence which iterate through datatable and using an if condition with condition as row(“ColumnName”).ToString.Equals(in_Subject)
And then filter it Accordingly


Nived N

Happy Automation :relaxed::relaxed::relaxed: