martmeister Posted July 29, 2009 Share Posted July 29, 2009 I have looked under help and couldnt find the answer I was looking for. I know this is probably a really easy answer but I was needing to know how to select a worksheet in Excel if you have multiple worksheets. Thanks a lot Link to comment Share on other sites More sharing options...
enaiman Posted July 30, 2009 Share Posted July 30, 2009 Help file quote:_ExcelSheetActivate --------------------------------------------------------------------------------Activate the specified sheet by string name or by number.#Include <Excel.au3>_ExcelSheetActivate($oExcel, $vSheet)Parameters$oExcel An Excel object opened by a preceding call to _ExcelBookOpen() or _ExcelBookNew() $vSheet The sheet to activate, either by string name or by number Return ValueSuccess: Returns 1Failure: Returns 0 and sets @error on errors:@error=1: Specified object does not exist@error=2: Specified sheet number does not exist@error=3: Specified sheet name does not existRead the help file - there is plenty about working with Excel workbooks. 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 More sharing options...
Juvigy Posted July 30, 2009 Share Posted July 30, 2009 Or you can use : oExcel = ObjCreate("Excel.Application") $oExcel.Visible = 1 $oExcel.WorkBooks.Open ("full path filename") $oExcel.Sheets ("sheet name" ).Select pubeoutros 1 Link to comment Share on other sites More sharing options...
MrCheese Posted July 9, 2017 Share Posted July 9, 2017 Is there a new way based on the current UDF? Link to comment Share on other sites More sharing options...
water Posted July 9, 2017 Share Posted July 9, 2017 You can find the difference between the "old" and "new/current" version of the Excel UDF in th help file. Function _ExcelSheetActivate has been removed. You specify the sheet you want to process as parameter when calling a function. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
MrCheese Posted July 10, 2017 Share Posted July 10, 2017 Understood - shame,as i'm still having trouble with the function as per: Link to comment Share on other sites More sharing options...
water Posted July 10, 2017 Share Posted July 10, 2017 You can still select the sheet "by hand". $oWorkbook.Sheets(<number or name>).Activate I will check your other thread as soon as I return from my business trip. SkysLastChance 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
MrCheese Posted July 10, 2017 Share Posted July 10, 2017 arrr! wasn't aware of that trick. Excellent - I will give that a go. And when you can - no rush really! Enjoy your trip. Link to comment Share on other sites More sharing options...
MrCheese Posted July 12, 2017 Share Posted July 12, 2017 I got it working with your suggestion. thanks for your help! Link to comment Share on other sites More sharing options...
water Posted July 13, 2017 Share Posted July 13, 2017 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki 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