Forum Discussion

subbu_valliappa's avatar
subbu_valliappa
Contributor
10 years ago

DDT Plugin in Windows 8.1

We have a number of data-driven scripts in our environment that reads data from Excel files. This worked perfectly in Windows 7 but are failing over in Windows 8.1 now.



I have checked the following:


  • DDTPlugin.pls is installed on the machine, located at <TestComplete>\Bin\Extensions\


  • ACE driver is also installed (Microsoft Access database engine 2010) as we are using Excel 2010


And here is our code:




function CreateDDTDriver(ExcelTestDataFile,SheetName,DriverName);


var drvExcel;


begin


 


drvExcel := DDT.ExcelDriver(ExcelTestDataFile, SheetName, true);


drvExcel.Name := DriverName;


result := DDT.DriverByName(DriverName); 


 


end;



Has anyone successfully used/tested DDT driver in Windows 8.1? Is there any additional steps that we should do for this to work?



Any help would be greatly appreciated.



8 Replies

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    The other error you are getting is likely because you're trying to connect to an XLSX, which does require the ACE driver as you had specified. Probably better to reinstall the 32 bit version of office or manually build the connection string instead of using the built in DDT method. Though I seem to recall having a similar problem of not being able to access the 64 bit driver from a TC script because the script engine is 32 bit :(.
  • The scripts actually fail with runtime error. The additional info says:



    Provider cannot be found. It may not be properly installed.



    I believe this should be the ACE driver. I have reinstalled it a few times but probably there is something else I need to do to set it up?



    The script fails at this line:



    drvExcel := DDT.ExcelDriver(ExcelTestDataFile, Sheetname, true);



  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    This shouldn't require any additional installations. I just ran a simple test of the driver on a fresh install of Win8.1 and it seems to work just fine. Make sure you have the "Data-Driven Test (Version: 4.0)" extension enabled under File>Install Extensions.





    //JScript example


    DDT.ExcelDriver(myXLSPath,mySheetName)


    while (! DDT.CurrentDriver.EOF())


      { 


      //Gets a value from the storage and posts it to the log


        Log.Message(DDT.CurrentDriver.Value(0)); 


        DDT.CurrentDriver.Next(); 


      }


      


      // Closes the driver


    DDT.CloseDriver(DDT.CurrentDriver.Name);


  • 'Data-Driven Testing (Version 4.0)' is selected in my options, just checked.



    Not sure what's wrong though, I'll probably try on other machines.
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    Sorry just realized you have the flag to specifically use the ACE driver.

    Same error message with this flag enabled. I suspect incorrect 64/32 bit driver let me give that a shot and see.
  • Great, thanks for confirming then.



    I tried again without the ACE driver flag



        drvExcel := DDT.ExcelDriver(ExcelTestDataFile, SheetName)



    but got this error now:



        External table is not in the expected format



    Got to look into this but another option would be to use ACE driver 32-bit - got to uninstall Office 64-bit first that we have on all our machines. I'll keep on trying.



    Thanks a lot for your time, really appreciate that.
  • Yes, those files are .XLSX so we would definitely need ACE driver. ACE driver 32-bit is the way to go forward then.



    Thanks for your time, Ryan. You have been very helpful.