Can you write a script for to insert array elements in an
excel A to Z columns only. if the number oe elements in the
array is greater than the number of columns (A to Z), come
to next row and proceed furthur. eah cell should contain
only one array value.
Answer / dwarapudi.mca
Dim arr
n=inputbox("Enter Array size")
ReDim arr(n)
For i=0 to n
arr(i)=cint("1")+Cint(i)
Next
Set Excl=CreateObject("Excel.Application")
Excl.workbooks.open("C:\Ex.xlsx")
Set ExclSht=Excl.Sheets.Item("Sheet1")
LOP=int((Ubound(arr)/cint(26))+1)
For i=0 to LOP
For j=0 to 25
If (j+k)<=ubound(arr) Then
ExclSht.cells(i+1,j+1)=arr(j+k)
else
Exit for
End If
Next
k=k+j
Next
Set ExclSht=nothing
Set Excl=nothing
Please let me know if u have simplest answer than this.
Thx
| Is This Answer Correct ? | 1 Yes | 0 No |
What is action split and the purpose of using this in qtp?
What is the difference between client server application and web based application?
How to covert a String to an integer?
Could any one suggest web site links to learning VB Script for QTP purpose??
explian about the qtp frame work? where u can use it in your project?
IN A WEB PAGE THERE IS TWO WEB BUTTON WITH SAME OBJECT PROPERTY AND VALUE, SO HOW I WILL IDENTIFIE OBJECTS INDIVISUALY.
How to Install QTP on Citrix Environment? Possible send me the installation steps.. That would be great help
What is User defined function in QTP
difference Between Call Run action and copy of action?
If you entered into yahoo mail with your valid user name and password , then you will get " welcome , username " (for example you will see , “welcome, Krishna” ) text on the top of the Inbox page , how can you test the user name is correct or not using QTP?
what are the attributes of QTP?
how to idetfy which test cases are automated?who will deside that plz tell me