Remove the break lines


#1

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…

image
image

Any help please?


#2

Please refer the below post and use vbConstants


#3

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.


#4

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,"")


#5

Thanks.

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?


#6

Could you please share the workflow if possible?


#7

(removed my workflow as it is not relevant)

it is somewhere in the middle…


#8

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


#9

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


#10

I’m not able to share it :(.


#11

I will try it immediately.


#12

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


#13

Great. Happy to help you!


#14

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