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 Posted / 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 |
Post New Answer View All Answers
How to open a new test using quicktest professional?
What is quick test pro?
What is the framework your company is following. What is the reason. Explain why key word driven frame work is chosen.
What are the factors on which script execution time is dependent?
www.icici.com after this home page wll came, in this page what r the items we r going to test for manual and what the element we r test for QTP... explian clearly with example
How to use debug tools?
How QTP identify the system time that's changes every seconds?
How to test background color and dynamic images during run time can you put the check point for moving objects?
What are the advantages of Object Repository?
Difference between action & Reusable action?
How to execute a winrunner script in quicktest professional?
How do Parameterization and Data-Driving relate to each other in QTP?
Why is action split used by qtp?
How will you handle java tree in qtp?
Explain different types of action in qtp?