Jump to content
redrum

Excel "Range copy and paste"

Recommended Posts

Hello,

I have been trying to use the Excel copy/paste type VB statements within AuotIt to move data between blocks of cells, using the following type statements:

$oExcelDP.Range(Cells(9, 3).Address, Cells(12, 7).Address).copy destination:=$oExcelDP.Range(Cells($BDrow+1, 2).Address, Cells($BDrow+4, 6).Address)

Then I  remembered the "names" are not used in AutoIt so tried - 

$oExcelDP.Range(Cells(9, 3).Address, Cells(12, 7).Address).copy $oExcelDP.Range(Cells($BDrow+1, 2).Address, Cells($BDrow+4, 6).Address)

Also tried the above statement without the ".Address".  Tried including the Workbooks("sheet"). prior to the range definition also.

 

I changed to reading the block to an array and then writing back to the new block location - which is working fine.

However, I'd like to know if there is a way to use the Excel VB commands for copy/paste data block ranges in AutoIt.  I suspect I may just have some error in my statements above.

Thanks,

Doug

 

Share this post


Link to post
Share on other sites

I did not find these Excel functions in the help.  So, I guess I need to update my Excel UDF as there must be some functions that I don't have.  Will check further on the Forum on this.

Thanks

Share this post


Link to post
Share on other sites

Which version of AutoIt do you run?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

I'm running v3.3.9.4 Beta most of the time.  Sometimes v3.3.8.1 - using this for some older scripts, but could probably use the Beta version for these also, just have not tried that.

Share this post


Link to post
Share on other sites

AutoIt is moving forward all the time. It blows having to update for script-breaking changes, but you'll find you miss out on new features by not keeping up. I would suggest getting yourself up to 3.3.12.0 as soon as you're able.

Share this post


Link to post
Share on other sites

OK that sounds good - now is a good time to do that as I am making significant changes to scripts. Regarding this upgrade I have a couple questions:

1.  I went to the Beta version quite awhile back because it had the com functions in it, and I was having some issues that required the com functions.  So, in the new version,are those com functions now included that used to only be in Beta?

2.  Are the new/updated Excel functions in this newer version also, or is there some specific Excel support that I also need to download and include?

Thanks

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

×
×
  • Create New...