I have a data in the clipboard and I want to paste it directly to a excel because I want to retain the structure. I tried by sending hotkeys as ctrl+v and tried with type into and sending same keys but did not work. Can any one help me with this.
Note:Also tried using get from clipboard and output saved in a string/dt and pasting it in excel is changing structure.
Did you tried using a “Select Range” activity from UiPath and after that use the Hotkeys activity with the “Ctrl+V” (without anything in the selector)?
The Select Range Activity should active the Cell/range that you want to paste.
From where are you getting the data that has formatting which is lost when pasting (using Ctrl+v or getting from clipboard activity)
If you run a script that will store everything in a variable then, while reading it if you replace newline character by a delimiter and then rebuild the string in uipath then the formatting will be intact.
The attached script is an example, tailor it to your needs and hope it helps.
Thanks for the warm welcome. The write cell activity was writing the entire data into once cell (I was copying the data from BOM from a Solidworks drawing and wanted to keep the source formatting).
I solved this issue bu using hot keys by these steps. Get from Clipboard→Set to clipboard→Open application (excel)→Type into - “[K(Alt)]”+“h”+“v”+“t”
this directly pasted the data with source formatting into the excel sheet.