CurrentDriver property to obtain the last
DDTDriver object created with either
CSVDriver methods of the
DDT object. The property frees you from using a global variable to store the reference to the driver in a case when the driver creation and data processing code are located in different script routines (see Using DDT Drivers).
The property is applied to the following object:
DDTDriver object that provides scripting interface to the last created driver object.
The code below creates a new Excel driver and gets access to its methods and properties via the
def CurDriverExample(): # Creates a driver DDT.ExcelDriver("C:\\MyFiles\\MyFile.xls", "Sheet1") # Iterates through records while not DDT.CurrentDriver.EOF(): # Gets a value from the storage and posts it to the log Log.Message(DDT.CurrentDriver.Value) DDT.CurrentDriver.Next() # Closes the driver DDT.CloseDriver(DDT.CurrentDriver.Name)