stickwiththescript Posted October 2, 2016 Share Posted October 2, 2016 I have over 43,000 rows of cells in (column A) of my excel sheet that are filled with information and used as headings for my blog posts. The goal is that I want to break all those individual cells into single parts where I can access them individually with my script by assigning a variable to the specific cell that I need to use. Would it be best to use an array to be able to access all of those cells from the excel sheet? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 3, 2016 Moderators Share Posted October 3, 2016 @stickwiththescript welcome to the forum. Yes, you can use _Excel_RangeRead to read the column into an array. Something like this: #include <Array.au3> #include <Excel.au3> Local $oExcel = _Excel_Open() Local $oWorkbook = _Excel_BookOpen($oExcel, @DesktopDir & "\Test.xls") ;Workbook with A1-A43000 filled Local $aArray = _Excel_RangeRead($oWorkbook, Default, $oWorkbook.ActiveSheet.Usedrange.Columns("A:A")) _ArrayDisplay($aArray) Depending on how unique the different entries are, you could then use _ArraySearch, like this (I simply numbered the cells 1 to 43,000): MsgBox(0, "", "Search Item found on row " & _ArraySearch($aArray, 18246)) stickwiththescript 1 "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...
stickwiththescript Posted October 3, 2016 Author Share Posted October 3, 2016 Excellent! Thankyou. The array display function displays all the rows perfectly. The only problem is that the message box reads out "Search item found on row -1". Link to comment Share on other sites More sharing options...
232showtime Posted October 3, 2016 Share Posted October 3, 2016 (edited) because you dont have 18246 value in Column A:A, type in the value 18246 any where in column A in excel Edited October 3, 2016 by 232showtime ill get to that... i still need to learn and understand a lot of codes Correct answer, learn to walk before you take on that marathon. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 3, 2016 Moderators Share Posted October 3, 2016 Yes, as 232showtime explains, replace 18246 with whatever value you're searching for "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...
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