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 |
explain abt dyanamic changing object with example?
I have thousands of links are there, i want check each and every funtionality of link by using descriptive programme, retrive link name from excelsheet then operate in application. Please anybody send me model script
what is review
We have 10 rows of records in data table, but we have to run 4th, 5th and 6th rows only. How can we handle this scenario in QTP?
5 Answers Accenture, Banca Sella, Polaris,
i have a window , initial its name is "NEW CUSTOMER" i have to enter the details of customer in the test object fields and after saving the window name is automatically changing with the customer name . so how to identify that window after saving. (i am using descriptive programming.)
What is difference between QC and TD?
What is the significance of “action 0” in qtp?
How many ways we can parameterize data in QTP?
HOW CAN WE GET THE VALUE OF TEXT BOX IN QTP? can you give me sample script for this where there is some condition. like if "text" THEN msgbox() else endif
how to merge object repositories in qtp for n different applications
What is the difference between Recover Scenario(screen) and on Error Resume Next(code)
what does it mean when a check point is in red color? what do u do?