Jump to content

unable to copy cell value to clipboard


Recommended Posts

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)
Link to comment
Share on other sites

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 :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...