Forum Discussion

cdouglas's avatar
cdouglas
Occasional Contributor
14 years ago

Way to count loop results?

Anyone know of a way to count DDT loop results? I've run several tests and the results are returning more rows than my Stored table. About 1600 more but I can't find a count of the returned results.

1 Reply

  • cgotberg's avatar
    cgotberg
    New Contributor
    I might not understand your question but you could just add a counter to your loop so you know how many times it was run.  Something like this in JScript



     var Driver;   

      Driver = DDT.ExcelDriver(yourExcelFileName, yourExcelFileSheet, true);

     

      var count = 1;

      while(! Driver.EOF())

      {

       Driver.Next();

       count++;

      }

      Log.Message("Count = " + count);

      DDT.CloseDriver(Driver.Name)