How to keep Structed/Read Format Text?

Hi All,

So, in previous projects we got some regular Text (small or long) from any paragraph and then paste it into another box. The original Text usually has a nice format as in lines in between and all that but when copied and paste it it basically makes one single paragraph loosing its original look.

I was wondering if anyone has been successful of pasting the Text but keeping the original looking (see below)?

Any thoughts will be appreciate it!..

•Lets see this sample having some Text as its original state:

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur."

•Text after being pasted:

"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. "

Stay Safe!

Does the same thing happen when you do a manual copy-paste? If not, maybe you can replicate the same steps in the Robot.

1 Like

Hi @AndyMenon,

Well, doing it manually would past it as usual but the thing is that the activity from the Studio ‘type into’ does not have that level yet of precision. I hope I’m not wrong…

You can use Clipboard activities

Get text to fetch the text from source
Followed by Get Text from Clipboard
Followed by a Ctrl+v operation to target

1 Like

Will give a try then, thx for the idea!..

Hi @AndyMenon ,

The thing is that the ‘Text’ is coming inside a variable as any of all the other values, so when it puts the value into the variable it looses its format. I think the ‘clipboard’ approach would work if you would read the value, take it to clipboard and paste it in the box with no others steps in between. Our process it needs to take all fields and values first, do some additional steps before getting to the actual place where they are saved, so that’s why we use variables but the the format gets changed and we go back to same place.

I hope I’m able to express my idea jeje…

Hi @AndyMenon,

I just tried your idea. I did a manual copy-paste but guess what, the format is gone. Even if I copy the text and paste it into ‘Notepad’, it drops a block of text, no format…

So this indicates is not a var thing, is just the way the operating systems does this action, copy-paste.

Any thoughts?

Did you try copy paste into Notepad ++ to see if the same thing happens? There is a setting in this editor to view line breaks /carriage returns to confirm if these formats are getting copied over.

Similarly, if you copy paste it into word, does it kill the format? Or does it stay put?

1 Like

Good question,

I’ve tried Word as well and unfortunately is not keeping the format. So my conclusion is that the actual text from the site is at it does not letting keep the format, is at the source then…

Hmmm. Does the site by itself have a right-click menu item that allows you to export the text with formatting?

Not really, just text as its native state, normal text I could say but no option…Good thought!

Sorry that this is taking many iterations to resolve. It is difficult to solution without getting an actual visual on the problem. I tried to mimic your actions on my end.

For example, I copy pasted the text from this window I am typing right now and pasted it into notepad and notepad++.

Both the editors managed to retain the format! So I am wondering what is different on your end.

If my simulation is close to your situation, I was thinking what might be different that is causing a different behavior on your end.

:thinking:
If you see the results below, it at least copies over the line breaks.

Thx so much Andy,

Great simulation by the way and I appreciate the effort. I realized is actually the site where I’m taking the text from causing the situation. Once you get that Text to clipboard regardless where you paste it, it ends up as a block of text but, if you text any other ‘Text’ from other source/site it maintain the format in notepad/note++, that proves it is the site where I need the Text from having that behavior.

If I find any other thing that might indicate otherwise I’ll share…

Stay Safe and thx so much again for keep trying!

You’re welcome @MARIODC !

One last thing though: I tried this as well that is unconventional

Select the text >> Right-Click >> Print.

It opens in a Print preview window.

I copy the text in preview window and paste it

It retains the format.

thanks

1 Like

I’m facing the same problem

I have a structured text in a excel file as input, then i transform this excel file in Datatable.

When i paste the text from this DT, i lost the format.

The main format that i need is the breack line that an user previously has typed on the excel file.

I dont know how to maintain these breack lines.

Hi @Marco_Aurelio

Did you try the below setting in ‘use excel file’ activity,
image

if you are using classic design, the please select as below,
image

Please let me know if it doesn’t work.

Regards,
Vasanth