issue with DDT driver method
Hi,
i'm trying to iterate through data, and when there's no more data it's throwing a VBScript runtime error saying Invalid use of Null:
** any help would be highly appreciated
Below is my code
Function ReadInputFile(filename)
Path = ProjectSuite.Path
ReadInputFile = path+"TestData\"+filename+".xlsx"
End Function
Sub ReadConfigData
Dim Driver
aqutils.Delay(600)
excelpath = ReadInputFile("NYTestData")
Set Driver = DDT.ExcelDriver(excelpath,"TestData",True)
While Not DDT.CurrentDriver.EOF
strExeIndicator=Trim(DDT.CurrentDriver.Value("Run"))
TestID=Trim(DDT.CurrentDriver.Value("TestID"))
msgbox strExeIndicator
msgbox TestID
DDT.CurrentDriver.Next()
Wend
'Set Driver = Nothing
DDT.CloseDriver(DDT.CurrentDriver.Name)
End Sub
Right... as mentioned, it's reaching row 11 improperly, probably because that is an "Active" row in your spreadsheet.
Go to your spreadsheet, highlight the ENTIRE row that is the first "blank" row at the end of your data, right click, and select "Delete Row". Save the spreadsheet and try again.