Sign in to follow this  
Followers 0
wasimwsm

unable to copy cell value to clipboard

4 posts in this topic

hi

i want to copy cell values from clipboard but i m not able to doing so my code is like follows

#Include <Excel.au3>
Local $oExcel=("c:\wsm.xls")
_ExcelBookOpen($oExcel)
WinActivate("Microsoft Excel - wsm")
$sCellValue = 
_ExcelReadCell($oExcel,6,6 )
MsgBox(0, "", "The Cell Value is: " & @CRLF & $sCellValue, 2)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

WinActivate("Microsoft Excel - wsm") seem to be useless in your code.

And this:

Local $oExcel=("c:\wsm.xls")
_ExcelBookOpen($oExcel)

is completely wrong if you intend $oExcel to be the object referrence; you still need to read about the functions you are trying to use. (that's the purpose of a help file)

_ExcelBookOpen is returning the object ref so the code should be changed to:

Local $MyExcel=("c:\wsm.xls")
$oExcel = _ExcelBookOpen($MyExcel)
Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

thanx enaiman for reply but how can i copy the cell to clipboard plz help me

Share this post


Link to post
Share on other sites

Did you try to fix your code the way I showed you? If you did, you should be able to read whatever is in that cell.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0