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 the ur roles and responsibilities as automation testing engineer?
Hi Friends, while playing the recorded test i am getting this error "Cannot identify the object "q" (of class WebEdit). Verify that this object's properties match an object currently displayed in your application." error is coming in this line of code "Line (2): "Browser("Google").Page("Google").WebEdit("q").Set "airtel broadband"". " .... please tell me how to overcome this problem. need help asap... Thanx in advance
how to acess a test in RSA?
How can we export test results to an excel sheet in QTP??? Can any one provide sample coding for this?????
How can we check whether a particular sheet loaded (existed) or not in Data Table.
How to test the mandatory fields in QTP?
I want to learn Advanced QTP, suggest me the best faculty in Hyderabad
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
what are the parameters you are considering for object identification?
What are output values and why they are used ?
What are the five challenges you faced in QTP?
What are the different ways to invoke an application using QTP?