Jump to content
Sign in to follow this  
yton

_ExcelReadArray - where data ends

Recommended Posts

yton

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

Share this post


Link to post
Share on other sites
Juvigy

Maybe something like:

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

MsgBox(0,"",$PARAMETER)

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
yton

thank you so much )

Share this post


Link to post
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
Sign in to follow this  

×