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
To retrive the test data which tool vl use and whats basis u vl write test data? its urgent
Explain calling sub procedure.
hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....
How to handle Java tree in QTP?
How to add verification steps to tests?
Is it possible to change the values of analog recording?
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
How to get the particular property value?
how did u use automating testing tools in ur job?
Problem with XML checkpoint in QTP ?
how to do the batch testing in test director using manual testing procedure?
What are the differences between table and db checkpoints?
What is the standard timing delay for web based application in qtp?
Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?