How to paste Excel cell value in another applcation?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
newb01
Newbie
Posts: 1
Joined: Wed Jun 07, 2017 3:06 pm

How to paste Excel cell value in another applcation?

Post by newb01 » Wed Jun 07, 2017 3:12 pm

Sorry for the very newb question, but I have used

XLOpen>C:\Users\newb01\Desktop\Macro Scheduler Test.xlsx,1,xlBook
XLGetCell>xlBook,Sheet1,1,1,strValue

Run>Notepad.exe
Press>ctrl
Send>v
Release>ctrl
press>ctrl
send>v
release> ctrl

to paste, but the value is not pasting. What am I missing here?

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: How to paste Excel cell value in another applcation?

Post by JRL » Wed Jun 07, 2017 8:24 pm

The XLGetCell> function does not put the value of the cell to the clipboard, the cell value is in your variable "strValue". So either use put clipboard to put strValue to the clipboard or do something like:

Code: Select all

Run>Notepad.exe
WaitWindowOpen>Notepad*
Wait>0.5
SetFocus>Notepad*
Send>strValue

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts