Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How To Capture Array Value into Excel Worksheet?
#1
Not Solved
Hi all,

I have been trying all various methods to get the run time value from the application to an array and then from the array to excel worksheet. Here is my script, please if you can educate me on what it is that i am doing wrong here. 

  systemutil.Run "iexplore.exe""www.edmunds.com/calculators"
Set MyBrowser = Browser("Micclass:=Browser""CreationTime:=0""Title:=.*").Page("Micclass:=Page""CreationTime:=0""Title:=.*") 

Set MyXL = CreateObject ("excel.application")
    MyXl.workbooks.open "C:\Users\User\Desktop\ArrayPracticeExcel.xlsx"
    MyXl.application.visible = True 
set MySheet = MyXl.activeworkbook.worksheets ("Sheet1") 
    
Dim oDesc
Set oDesc = Description.Create
set oDesc = Description.Create 
    oDesc("Micclass").Value = "WebEdit"
    oDesc("Name").Value = "calc_default_value"
    oDesc("html tag").Value = "INPUT"
    
    set Obj = MyBrowser.ChildObjects(oDesc)
    msgbox Obj.Count 
    

Dim i,x,Arr1()

For i = 0 To obj.count-1
    x = obj(i).GetRoProperty("html id")
        msgbox x
        ReDim preserve arr1(obj.count-1)
        arr1(i) = x 
        
Next
ReDim preserve arr1(obj.count-1)
For j = 0 To ubound(Arr1)
    mysheet.cells(i,"A").Value = arr1(j)
Next

This Line above only adds the value to the 4th row and nothing else. I wan the script to be able to capture the value and put them into row 1,2,3,and 4. Please any help would be greatly appreciated. 
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to convert a single dimension array to two dimensional array venkatesh9032 3 5,192 02-10-2014, 03:07 PM
Last Post: pranikgarg
  Excel or Array? csutter2002 6 3,914 02-19-2013, 07:54 PM
Last Post: csutter2002
  Adding array to another Global array in VB Script test911 1 3,008 12-02-2012, 12:40 PM
Last Post: parminderdhiman84
  Parameterize Excel Columns for 2-Dimensional Array defcon3 2 3,399 06-20-2012, 04:59 PM
Last Post: defcon3
  How to capture/parameterize ID's created on the server side that QTP does not capture rdwaram 1 2,758 10-17-2009, 02:37 AM
Last Post: jsknight1969

Forum Jump:


Users browsing this thread: 1 Guest(s)