Results 1 to 4 of 4

Thread: First output value is getting overwritten by second output

  1. #1
    Geek_Guest
    Guest

    First output value is getting overwritten by second output

    I want to add the output values of two scenarios in the DataTable during runtime. However, after running the test script only the output value of second scenario is getting displayed in the Data Table as viewed through the Runtime Table Summary. The first output value is getting overwritten by the second output value.

    I tried using the "DataTable.SetNextRow" method, however its not working.
    Kindly assist.
    Many thanks

    Question asked by visitor


  2. #2
    Contributing Member
    Join Date
    Feb 2006
    Answers
    85

    Re: First output value is getting overwritten by second output

    Can you please elaborate more on what is ur problem as the output value will be written only on the current row and until you pass to next row in ur script the values will be overwritten.

    If you want to kep the value of any object then its always better to use the GetRO propery and assign it against some variable.

    Hope this helps you can always come back with more clear explanation of your problem.

    Thanks,
    Kunals.


  3. #3

    Re: First output value is getting overwritten by second output

    Try this:

    Save the two output values in "FOutputValue" and "SOutputValue" and use the following code:

    (Pre-req: Create a dummy file named dummy.xls in the root folder)

    Set ExcelAppl=CreateObject("Excel.Application")
    Set WrkBook=ExcelAppl.Workbooks.Open("C:\dummy.xls")
    Set sheetPrimary=WrkBook.Activesheet
    sheetPrimary.Cells(1,1)=""&FOutputValue
    sheetPrimary.Cells(1,2)=""&SOutputValue
    WrkBook.Save
    ExcelAppl.Quit

    Last edited by Anshoo_Arora; 01-05-2008 at 04:48 AM. Reason: Added Explanation

  4. #4
    Junior Member
    Join Date
    Dec 2009
    Answers
    27

    Re: First output value is getting overwritten by second output

    You have to use this command

    Datatable.getsheet("sheetID").getparameter(column name).valubyrow(rownumber) = value

    next time you have to change row number

    try this ...............

    -Kishore.gp


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact