Remove the break lines

Hi all,

I am storing a value as a variable out of an excel cell but I am not getting the complete value
I am using it further in my workflow and it then only shows “R. Storrs” while it should show “R. Storrs_EMC_AR_65208_ENQ_Nov18” . As you can see below I have a break line in it. I already tried with mystring.replace(“\n”,“”) or mystring.replace(environment.newline,string.empty) but it is not working…


Any help please?

Please refer the below post and use vbConstants

Thanks for this reference.
But I don’t know how to get started. Is it in an assign activity?

For example like this?:
Assign: x = InputStringVariable.Split("delimeter"c) or should it be Assign: x = InputStringVariable.Split("vblf"c)? Also I will then split it but I need the whole part again afterwards without \n in between.

Ooops. Sorry for not making it clear!
That was just a reference. Please use vbConstants to replace the new line: In Assign activity
For example:
Left hand side : mystring
Right hand side: mystring.Replace(vbCrLf,"")


However it still does not remove the \n :frowning: as you can see in the output below. You can also see the code I used in the assign.

Any other option?

Could you please share the workflow if possible?

(removed my workflow as it is not relevant)

it is somewhere in the middle…

Would even need sample xlsx file to find the data structure!

Or probably you can try changing the vbCrLf with other constants like vbLf, vbCr, vbVerticalTab. Please share the outcome.


I’m not able to share it :(.

I will try it immediately.

vbLf did the trick! Thanks for saving my day Dominic, much appreciated! :slight_smile:

Great. Happy to help you!

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