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 |
Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?
How to Test Dynamic links ?
Hello everybody, can we maintain the state of page in QTP? 1. suppose i opened a notepad text file i entered some text and changed the font type and font size and saved that file. 2. Now next time when i will open a new notepad file it is showing me that font type and size which i changed in my previous step. 3. Here i want that QTP should capture the default setting i.e. it should maintain the state of the page. Thanks in advance, Gaytri
What is the difference between the design-time and run-time data tables?
Friends please let me know how id following possible in QTP: Can I apply conditional loop on a bitmap/image or any other checkpoint. Like if checkpoint passes then if or Else
Give me diffrent script in QTP for Webpage(Java and .Net),WindowsBased Applications,Java application,.Net application...
What does VBS file contain?
Is virtual object supported in low level recording mode?
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
A web page has two butons with same properties and rotating in clockwise direction. how to click on any of the button?
what is object repository size?
WHAT IS ENVIRONMENT VARIABLES?
7 Answers AZTEC, CTS, Ready Test Go,