SerHenning Posted July 24, 2019 Share Posted July 24, 2019 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 Link to comment Share on other sites More sharing options...
jitb Posted July 24, 2019 Share Posted July 24, 2019 (edited) try _Excel_RangeCopyPaste($oWorkbook.Activesheet, "A2") (Called with worksheet object) Edited July 24, 2019 by jitb Link to comment Share on other sites More sharing options...
SerHenning Posted July 25, 2019 Author Share Posted July 25, 2019 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. Link to comment Share on other sites More sharing options...
SerHenning Posted July 25, 2019 Author Share Posted July 25, 2019 2 hours ago, jitb said: try _Excel_RangeCopyPaste($oWorkbook.Activesheet, "A2") (Called with worksheet object) I think I had to quote that, woops Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 25, 2019 Moderators Share Posted July 25, 2019 Moved to the appropriate forum. Moderation Team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
SerHenning Posted July 25, 2019 Author Share Posted July 25, 2019 I deleted all of the code after it and pasted it in again and now it works, but whatever, works now. Thank you @jitb! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now