DDTDriver object is a DDT driver object that provides easy access to data stored in tables of ADO databases, Excel sheets or files holding data in comma-separated format (CSV files).
You can obtain a
DDTDriver object in scripts by calling methods and properties of the
DDTDriver object provides unified access to data regardless of their storage format. You can work with data stored in an Excel sheet or a CSV file in the same manner as if this data was stored in a table. For more information on working with the
DDTDriver objects, see Using DDT Drivers.
|Note:||Drivers that provide access to ADO databases have methods and properties of
The code below creates an Excel driver and then iterates through the records of the specified file using the properties and methods of the
def DDTDriverExample(): # Creates a driver Driver = DDT.ExcelDriver("C:\\MyFiles\\MyFile.xls", "Sheet1") # Iterates through records while not Driver.EOF(): # Gets a value from the storage and posts it to the log Log.Message(Driver.Value) DDT.CurrentDriver.Next() # Closes the driver DDT.CloseDriver(Driver.Name)
' Creates a driver
Set Driver = DDT.ExcelDriver("C:\MyFile.xls", "Sheet1")
' Iterates through records
While Not Driver.EOF()
' Gets a value from the storage and posts it to the log
' Closes the driver