meatsack Posted February 18, 2010 Posted February 18, 2010 I give up. I know I should use _ArrayToString to convert my excel column which is an array to a string variable, but how? When I try and debug it I usually end up with just one cell's data reported in the message box or no data at all. Once I get it into a string then I can debug it with the message box. Thanks in advance for any help. $aArray = _ExcelReadSheetToArray($oExcel, 1, 2) ;Local $aArray = StringSplit("a,b,c,d,e,f,g,h,i", ",") _ArrayToClip($aArray, 1) MsgBox(0, "_ArrayToClip() Test", ClipGet()) Local $sString = ClipGet() ;Local $sString = _ArrayToString($aArray, @TAB, 2, 4) ;$sCellValue2 = _ArrayToString($aArray, @TAB, 1, 3) ;$sString_Indirect2 = "" ;For $i = 2 To 4 ; $sString_Indirect2 &= '"' & $aArray[$i] & '" ' ;Next [autoit ]I can't use, Dim $avArray[20] as sometimes it will be more than 20 items or elements. _ArrayDisplay($avArray, "$avArray") The following doesn't work as sometimes I have more than 7 elements sometimes less: MsgBox(0, "_ArrayToString() getting $avArray items 1 to 7", _ArrayToString($avArray, @TAB, 1, 7))[/autoit]
enaiman Posted February 18, 2010 Posted February 18, 2010 Again involving the clipboard for simple things??? You should use more _ArrayDisplay. If _ArrayToString doesn't work properly (which I seriously doubt ...) what prevents you to use a For/Next statement for that particular column and write your own "_ArrayToString-equivalent" function? I'm sure you are making a mistake somewhere because that function works (I can't see any _ArrayDisplay($aArray) anywhere in your script - how can you expect to work with an array if you don't know how it is looking like?). Less hurry, more thinking. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
meatsack Posted February 18, 2010 Author Posted February 18, 2010 Oh that was cool, ah ha now I can see what I am doing with this data juggling. As long as I can see what is in my variable and I can put what I see into a variable I can figure alot out from that. Thanks. I guess I didn't need that shitty high school algebra 101 then remedial algebra after all.Again involving the clipboard for simple things???You should use more _ArrayDisplay. how can you expect to work with an array if you don't know how it is looking like?).Less hurry, more thinking.
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