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 interviews will be on QTP?
What is qtpro? What is a quick test professional?
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?
Explain about Test Fusion Report of QTP?
What are the different ways to invoke an application using QTP?
Where can I find and view run-time data table?
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 are items we r going to test for QTP... explian clearly with example
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
What are output values and why they are used ?
What is a reusable action?
What are private functions in QTP? How they can be called from the function library?
What is checking bitmaps?
in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?
Explain the benefits of quick test pro(qtp)?
What is the differences between image check point and bit map check point?