Jump to content
Sign in to follow this  
SerHenning

Excel Readout isnt Copying to the Clipboard - (Moved)

Recommended Posts

Hey :) I'm trying to make autoit read out a cell from an excel docuement

#include <IE.au3>

#include <Excel.au3>
#include <MsgBoxConstants.au3>

Local $var = "C:\Users\Jan\Documents\Projekte\Autoitlernen\excel\testitest.xlsx"
Local $oExcel_1 = _Excel_Open()
Local $oWorkbook = _Excel_BookOpen($oExcel_1, $var)
;Local $_read = _Excel_RangeRead($oWorkbook,"Tabelle1","A2")
Local $_read = _Excel_RangeCopyPaste($oWorkbook,"Activesheet","A2")


It opens the excel file, so thats working, but it doesnt copy anything to the clipboard ­čśĽ

yours Jan

Share this post


Link to post
Share on other sites

try

_Excel_RangeCopyPaste($oWorkbook.Activesheet, "A2")

(Called with worksheet object)

Edited by jitb

Share this post


Link to post
Share on other sites

Thanks for your help! Its weird, when I pasted it in first, it worked perfectly fine with your version, then I changed something in the parts a little down in the code and tried it again, and it says that the problem is in the line above. It says

Local $_read =
_Excel_RangeCopyPaste($oWorkbook.Activesheet,"A2")
Local $_read =
_Excel_RangeCopyPaste($oWorkbook.Activesheet,"A2")^
ERROR

Error: Unable to parse line.

Share this post


Link to post
Share on other sites
2 hours ago, jitb said:

try

_Excel_RangeCopyPaste($oWorkbook.Activesheet, "A2") ´╗┐´╗┐´╗┐´╗┐

(Called with worksheet object)

I think I had to quote that, woops

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...