Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameterize at different pace, and multiple write to Excel
#1
Not Solved
I've been trying for a week to get timer events to write to an excel file but have had 0 luck finding an answer that is clean and efficient.

There's a secondary issue here as well, in that my loops scripts loop indefinitely, even though they shouldn't (afaik)

What I am trying to do:
1) Search requires two fields: Location and Product
2) Each Product will be searched with each location (6 of each, 36 total)
3) Each search will be timed, with the results being written to an excel file.
4) Excel needs to have all 36 location + product + search time recorded


Code:
Do While viteration01 < 6
    If viteration01 > 6 Then Exit Do
        Browser("...").Page("...").WebEdit("...").Set "locA"
        Browser("...").Page("...").WebEdit("...").Set DataTable ("Prod", dtglobalsheet)
        Browser("...").Page("...").WebButton("Submit").Click
        vSC = Browser("...").Page("...").WebTable("...").GetCellData (2,1)
        vProd = Browser("...").Page("...").WebTable("...").GetCellData (2,2)
        'msgbox "SC = " & vSC &_
        'vblf & "Product = " & vProd
        
        viteration01 = DataTable.GlobalSheet.GetCurrentRow
    '    msgbox "Iteration #: " & viteration01 &_
        'vblf & "SC = " & "01" &_
        'vblf & "Parameter = " & DataTable.GlobalSheet.GetParameter ("Prod")
    DataTable.GlobalSheet.SetNextRow
    
Loop

Using that loop to go through all of the products for each location, as opposed to having a massive parameterization list. It works as far as exiting the loop and going to the next block, but at the end of the script it all restarts.

Secondly, I have tried using various scripts to write to an excel file, but I can't seem to get any to work. Even then I'm not sure how I can write the time event (which isn't added yet) to the next open row. So far it looks like it would only write to the designated cells?
Reply


Messages In This Thread
Parameterize at different pace, and multiple write to Excel - by joncfrazier - 07-10-2012, 12:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  parameterize Excel Sheet Name in SQL bjitsidhu 0 2,918 07-20-2014, 08:34 AM
Last Post: bjitsidhu
  How to read and write in excel through QTP script shwetha_m 5 29,723 03-14-2014, 02:58 PM
Last Post: venkatesh9032
  Import multiple values from excel into QTP Shaik Ahmed 2 3,519 03-09-2014, 09:17 PM
Last Post: Shaik Ahmed
  How to make multiple dependent list in excel? pradeep singh 1 2,293 09-20-2012, 10:57 AM
Last Post: sshukla12
  Multiple users executing QTP script using Excel Input vinodindia 0 3,217 07-05-2012, 11:41 PM
Last Post: vinodindia

Forum Jump:


Users browsing this thread: 1 Guest(s)