Results 1 to 2 of 2

Thread: Create a table in excel

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Answers
    2

    Create a table in excel

    How want to create a table in excel through which winrunner reads the data according to the parameters


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: Create a table in excel

    Hi,

    Firstly create a Excel sheet with required Column names and specify the data required under it.

    Data-driven tests in Winrunner as basically carried out using the ddt statements. The following steps would provide a guideline as to how to read data from an Excel file and parameterize your script -

    ------------------------Start of Code---------------------------

    Datatbl = ddt_Open("Path of Excel File", ddt_mode_read);
    ddt_get_row_count(Datatbl,rowcount);
    ## Rowcount is the output variable where number of Rows is stored.
    for(i=0;i your field.value = ddt_val(Datatbl,parameterName);
    ddt_next_row;

    ## ParameterName would be the Column Name in Excel sheet under which your data would be stored.

    -------------------------End of Code-----------------------------

    You could also the Data-Driver wizard to carry out parameterization. Select the Excel file you have created, map the parameters to the columns in the Excel. It should generate the same code listed as above.

    Cheers....


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