yton Posted May 3, 2010 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
Juvigy Posted May 3, 2010 Posted May 3, 2010 Maybe something like: $PARAMETER=$oExcel.ActiveSheet.UsedRange.Columns.Count MsgBox(0,"",$PARAMETER) $aArray = _ExcelReadArray($oExcel, 1, 13, $PARAMETER, 1)
PsaltyDS Posted May 3, 2010 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
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