Jump to content

_ExcelReadArray - where data ends


Recommended Posts

greetings,

i need to _ExcelReadArray from a certain column like this:

$aArray = _ExcelReadArray($oExcel, 1, 13, "PARAMETER", 1)

the thing is that the number of cells, filled with data (= "PARAMETER"), in this column varies from 20 to 100 each time I launch the script

therefore, i do not want to stuck to a certain number in this case

how can i set the "PARAMETER" value then?

thank you,

Edited by yton
Link to comment
Share on other sites

Maybe something like:

$PARAMETER=$oExcel.ActiveSheet.UsedRange.Columns.Count

MsgBox(0,"",$PARAMETER)

$aArray = _ExcelReadArray($oExcel, 1, 13, $PARAMETER, 1)

Yes, but the .UsedRange property is already included in the _ExcelReadSheetToArray() function. So you can also just do:
$aArray = _ExcelReadSheetToArray($oExcel, 1, 13, 0, 1)

The array returned by _ExcelReadSheetToArray() is formatted differently than for _ExcelReadArray(), but is still easy to work with.

:idea:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

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