Remove line with empty spaces

this is my dta noew i want to remove the spaces after each line ,can any one help me to solve this

1 Like

Here you go
If this is stored in a string variable named str_input then. Use a assign activity like this
str_output = String.Join(Environment.Newline,str_input.Split(Environment.Newline.ToArray(),Stringsplitoptions.Removeemptyentries))

Where str_output is a string variable

Kindly try this and let know for any queries or clarification
Cheers @Manisha541

thanks a lot for help it worked

1 Like

if you dont mind can u explain me how it works @Palaniyappan

1 Like

hi @Manisha541

use the below expression to remove the space.

var1 = var1.replace(vblf,"")


First we split the line with split method using environment.newlone.toarray which converts to array of value
Stringsplitoptions.Removeentries will remove the empty spaces between strings
—then we have them now as array of string but we need them again as paragraph so used string.join method to join them with a Newline in between them which is fine again with environment.Newline

Cheers @Manisha541

thanks for explaining @Palaniyappan

1 Like

Cheers @Manisha541

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.