Hello All ,
I need to replace Alt+Enter with space in a column name.
I tried to replace like this : item.ToString.Replace(Environment.NewLine," ")
But its not working. This is what the cell looks like :
Can anybody please help me with this.
Regards,
Akanksha
item = item.tostring.Replace(ā\n", āā).Trim()
Hello @BjarteIversen ,
Thanks for the reply. I have tried with \n as well but that is also not working.
amaresan
(Amaran)
September 10, 2020, 7:16am
4
Hi @pakankshabha
system.Text.RegularExpressions.Regex.Replace(yourStringVariable,ā\nā," ")
If it is resolved your problem . Please mark as solution
Thanks,
Amaresan. P
Hi @pakankshabha
Are you sure there is a linefeed in the string or is it a gui breaking the string because of the column width?
Try printing the result of the replace statement to console to be sure.
/B
Hello All ,
Thanks for the responses. I tried with item.ToString.Replace(Chr(10)," ")
This solution worked for me.
1 Like