Control + V in excel types "v" in cell

excel
activities

#1

Hello,
I need to copy lines from excel file 1 to excel file 2.
I used Send Hotkey with Cntrl + c in file 1, this works.
But when I go to file 2 and Send Hotkey with Cntrl + v, instead of pasting, the robot types “v” in cell.
I have also tried using Type Into and sending “[d(ctrl)]v[u(ctrl)]” and it is doing the same thing.

What is the best way for sending cntrl + v so that it works consistently?
Thank you,
Ian


#2

This only happens when I have “SendWindowsMessages” checked.
I am trying to run this on an unattended robot.


#3

Hi @in006, I am unable to simulate your problem.

By the way, do you have get clipboard activity before sending CNTL+v ( lower case) ?

-Viswa


#4

Hi Viswa,
This problem does not happen all the time.
But sometimes, for certain files, robot will type “v” into the first selected cell, instead of doing cntrl+v to paste.

No, I am not using Get From Clipboard activity. Should I be?
I want to send cntl+c in one excel file, and then send cntl+p into another excel file.
The data I am copying is around 50,000 - 100,000 lines in excel.

What is the best way to send hotkeys to excel, while making sure it can run unattended?

Thank you,
Ian


#5

I have more reliable success using TypeInto to perform keystrokes.

You can do ctrl+v like this:

TypeInto “[d(ctrl)]v[u(ctrl)]”

“d” is for down and “u” is for up. You need end with the up press or it will lock control in down press.

Works well for me, but hope it helps you.

Regards.


#6

Sorry, I didn’t read all of what you said regarding my suggestion. Since you already tried TypeInto, do you have the Delay between keys set to like 10 or 20? That might help. Also, sometimes the Ctrl key gets pressed before it is ready and so it only does the “v” key, which then types it in the cell. You could try delaying the hotkey by a few seconds.


#7

Hi Clayton,
I actually learned about the ‘TypeInto to perform keystrokes’ method from your reply to another topic.
I did not set the delays though, so I’ll try that later today and let you know how it goes.

Thank you!
Ian


#8

Hi Clayton,
I added the delays but I’m still getting the same problem where the robot types ‘v’ in a cell instead of doing cntl+v.
This issue only happens when I run it under a locked screen. Works fine when I run it attended.
Do you know of anything else I should try?

Thank you,
Ian


#9

Hi. I’m not really sure how I can help further without direct troubleshooting in your environment. What I can do though is I have a component directly from one of my projects I worked on a while back, which I can attach. ctrlVtoExcel.xaml (21.6 KB)

Hopefully there is something there that will help. I’m using the Send Hotkey for the Ctrl+v in this case, plus I’m verifying the correct text was pasted to throw an error so it can return back to the Main and perform a retry on that component.
EDIT: correction: it does a retry using a Retry scope inside the Excel Scope. If that fails, THEN it goes back to the main to clear environment and retry, etc.

Regards.