Jump to content

Recommended Posts

Posted

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?

  • Moderators
Posted

@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))

 

"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!

Posted (edited)

because you dont have 18246 value in Column A:A, type in the value 18246 any where in column A in excel

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...