Medic873 0 Posted June 8, 2012 Here is what im doing im using the _ExcelReadSheetToArray function to pull my excell sheet and it works great but when I try to make it for example use the data put into colum 2 row 2 how do I specify that in my variable take a look at the code im sure it will make more sense. ; ****************************************************************************************** ; Example 1 - After opening a workbook and returning its object identifier, ; Fill some cells and Read the Values into an Array, using various paramaters. ; ******************************************* #include <Excel.au3> #include <Array.au3> Local $oExcel = _ExcelBookOpen("C:\Users\bmmorley\Desktop\WorldShipList.xlsx") Local $aArray = _ExcelReadSheetToArray($oExcel) ;Using Default Parameters _ArrayDisplay($aArray, "Array using Default Parameters") msgbox (1, "Random Pick", $aArray[2]) Share this post Link to post Share on other sites
water 2,369 Posted June 8, 2012 _ExcelReadSheetToArray creates a two-dimensional array. To access row 2, column 2 of your Excel sheet you have to use msgbox (1, "Random Pick", $aArray[2][1]) The indices for arrays start with 0. But because row 0 of the array contains the row and column count the index for row 2 of your data is 2. Column 2 is index 1 because we start with 0 for columns. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites