Forum Discussion

murugans1011's avatar
murugans1011
Regular Contributor
10 years ago
Solved

DDT Driver Column index

I knew somthing with which we can refer excel value using Columnname. Is there anyway that i can get the index of the current column using Column name. i knew which somthing which can be done in script to get column index



[VBScript]

function ColIndex

  set driver=DDT.ExcelDriver(filepath,SheetName,True)

   for i=0 to DDT.CurrentDriver.ColumnCount

      if  (DDT.CurrentDriver.ColumnName(i))="Column5" then

       ColIndex=i

     Exit for

   End if

   Next

End function



but if there is a builin funtion like



  DDT.CurrentDriver.Columnname("Column6").Index  or

 Driver.Value("Column6").Index   then it will be nice.
  • Hi Murugan,

     


    Currently, that's impossible. We have a corresponding suggestion to implement this method - I've added your vote to it.


     

1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Murugan,

     


    Currently, that's impossible. We have a corresponding suggestion to implement this method - I've added your vote to it.