Forum Discussion

larolsen's avatar
larolsen
Contributor
10 years ago

Major issues with DDT.ExcelDriver

Hi



We have a strange problem with the DDT Exceldriver...



We use TestExecute 10.30 on our windows testmachines, and we store setup information for the tests in an Excelsheet.

We access the data in Excel via an installed ACE driver, and this command:



Set DdtGlobal = DDT.ExcelDriver(G_strTables, P_strSheetName, TRUE)



G_strTables holds a full path to the excelworkbook, and p_strSheetName holds the name of the requested sheet. The DdtGlobal is a globally defined object, used throughout our testscripts.



On SOME of the machines, this works fine. On SOME machines it fails 10-20 % of the times, and on a few machines it never works. The error seems to occur evenly on VMware virtual machines, as well as on "real" machines.

The error message in our logs, are the rather uninformative "Unspecified Error".



We have tried ALOT of things to try and resolve this on our failing machines, but with no luck. So far we have tried:



* Re-installing the machines, incl TestExecute

* Create a blank excelsheet from scratch

* Tried installing a newer ACE driver

* Tried writing errorhandling around the failing call

* Even tried installing Microsoft Office on one of our testmachines



None of this fixed it.



Any tips to getting around this problem is much appreciated, as it is driving us nuts!



Best regards

Lars Lund Olsen

7 Replies


  • -- What kind of error exactly occurs? 


    -- This error occur in random machines? For example, the machines that never works are the same always?


    -- Could you share the script that you are using?

  • Hi



    The error is actully stated as "Unspecificed Error"... And then the script execution stops. This is partly what makes this so difficult to debug.



    We have narrowed it down to a few machines that almost always fail with this, so it is not completely random.



    The code that fails is actually this simple:



    Function DdtGlobal(P_strSheetName)

      if aqFile.Exists(G_strTables) = false then

          log.Error("Excelworkbook could not be found at: " & G_strTables)

      else

          Set DdtGlobal = DDT.ExcelDriver(G_strTables, P_strSheetName, TRUE)

       end if

    End Function



    G_strTables contains the correct path to the worbook

    P_strSheetName contains the name of the sheet in the workbook

    Both of these variables are filled with correct information.



    Best regards

    Lars Lund Olsen
  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Hi Lars,



    You might have a file access problem. Is the Excel file in a network directory or local to every machine? Local would be better.



    Sincerely
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Another possibility is that Excel ACE driver in not installed.

    Note: as TestComplete is 32-bit application, you must have 32-bit version of Excel ACE driver installed in the system in order TestComplete can use it.
  • Hi and thanks for your input :-)



    The Excel file is copied to local machine before test execution. And if it would be an access problem, I assume the aqfile.exists() would have caught it.



    The ACE driver is installed, and it is the 32-bit version.



    This IS really a weird problem... Any input is much appreciated.



    Best regards

    Lars Lund Olsen
  • Hi Lars,



    I guess these are problems with ACE driver installations.



    I suggest you to give a try using "ADODB.Connection" or "Excel.Application" COM objects
  • After we moved away from the failing 32-bit machines, to virtual 64 bit machines, the problem hasn't showed it self yet *fingers crossed*



    Would still like to know the root-cause, if anyone got any ideas?



    Best regards

    Lars Lund Olsen