yton 0 Posted May 3, 2010 (edited) 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 scripttherefore, i do not want to stuck to a certain number in this casehow can i set the "PARAMETER" value then?thank you, Edited May 3, 2010 by yton Share this post Link to post Share on other sites
Juvigy 49 Posted May 3, 2010 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 39 Posted May 3, 2010 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. 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