royd
9 years agoRegular Contributor
Checked everything, but still getting "An attempt to work with a closed driver" (DDT - ExcelDriver)!
I have installed Microsoft Access Database Engine 2010 already. Using TestComplete 12.3 and Excel 2013. I am still getting "An attempt to work with a closed driver" error! Here is my script (JavaScript) -
try
{
DDT.ExcelDriver("c:\\femalePatients.xlsx", "Female_E");
while (!DDT.CurrentDriver.EOF())
{
if (DDT.CurrentDriver.Value("Name") == "Lizzie Hari")
{
New_Patients.createPatients();
}
DDT.CurrentDriver.Next();
}
}
catch(exception)
{
Log.Error(exception.message);
}
DDT.CloseDriver(DDT.CurrentDriver.Name);
I even restarted the computer to make sure DDT drivers not running, still no go!
Help is much appreciated.
Dave
Change your code to the following:
DDT.ExcelDriver("c:\\femalePatients.xlsx", "Female_E", true)and see if that works.