phan423 Posted March 28, 2012 Share Posted March 28, 2012 I'm having trouble trying to copy and paste a range of cells from excel to another excel sheet. I don't want to have to use a loop and go through each cell and copy and paste it. Any faster method? I tried using: $a=_ExcelReadCell($oExcel1, "C2:E2") ClipPut($a) WinActivate($sWindow2) send("^v") not sure if i'm defining the range correctly because it pastes an empty string Link to comment Share on other sites More sharing options...
jhtromb Posted March 28, 2012 Share Posted March 28, 2012 (edited) Take the following functions: _ExcelCopy($excelfile, "C2:E2") _ExcelPaste($excelfile2, "A1") For A1 you take the cell in the second file where the pasting starts! Hope that helps! Edited March 28, 2012 by jheinze Link to comment Share on other sites More sharing options...
Fabinho Posted October 1, 2018 Share Posted October 1, 2018 tks, but it's returnin an error: Link to comment Share on other sites More sharing options...
Fabinho Posted October 1, 2018 Share Posted October 1, 2018 I got it!!! I changed like this: _Excel_RangeCopyPaste($oWorkbook.Worksheets(1), "L4:O4") And worked!!! thank you!! 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