Forum Discussion

Bob_Loblaw's avatar
Bob_Loblaw
Occasional Contributor
7 years ago

Is Excel 2016 compatible with TestComplete 12?

I am trying to do a data loop in the tutorial and when specifying the spreadsheet, I am prompted to install the 64 bit version of Office 12.0 Access Database Engine OLE DB provider from Access 2010 redistributable.

 

I am working on a brand new laptop with 64 bit Windows 10 and freshly installed Office 365 which contains Excel 2016.

 

The instructions on the Microsoft website tell me to remove all versions of Access. As mentioned, I just installed Office 365 and it works fine except for when I try to use it with TestComplete.

 

Is there a workaround that will permit me to do a data-driven test with Excel 2016?

 

I've attached a snip of the error.

 

Thanks In Advance - Bob

  • AlexKaras's avatar
    AlexKaras
    7 years ago

    Hi,

     

    the only way to use 64 bit Excel 2016 is to remove it and install 64 bit drivers from Office 2010

    No. Excel may be left as it is. :)

    There are four players in this game:

    1) First and foremost: there is an Excel file that contains data that you need;

     

    2) There is the Excel application. Excel application can manipulate data in the Excel file. In most cases, this manipulation is done via graphical user interface (GUI) and this is what you do when you open the file in Excel and working with it. Besides that, Excel application can also be used as a COM-server. I.e. it is possible to create its COM instance (via Sys.OleObject('Excel.Application') call) and work with the file using methods and properties provided by Excel's COM object model. While this is the way that you may try (check MS documentation for Excel Object Model for more details), this is usually an overkill for the simple tasks like yours when the only thing that you need is to read data from Excel file. Also, using Excel as COM server requires Excel to be present on the given machine which means a considerable disk space requirement and appropriate licensing. This is where player 3) appears.

     

    3) There are drivers based on either OLE DB or ODBC technologies that, when installed, can read (and, optionally, write) data from Excel file. These drivers do not require Excel to be present on the given box which means lower disk space and licensing requirements. Obviously, as they are computer programs, these drivers can be of 32-bit or 64-bit flavors. Generally, 32- and 64-bit applications do not interfere with each other. But in case of Excel drivers, their 32- and 64-bit flavors have problems when installed side-by-side and this is described in the previously referenced help topic.

     

    4) TestComplete. This is the consumer that reads data from Excel file 1) via drivers 3). Due to Windows OS architecture, in order to be able to communicate, both TestComplete and Excel drivers (not Excel application which is not used in this process) must be of the same bitness. Either 32- or 64-bit. Which one is determined by your requirements/preferences, but the same.

     

    So, based on the above, you should decide what TestComplete and Excel drivers bitness is more preferable to you. Usually, unless there are some 64-bit-specific requirements, 32-bit flavors work quite well.

    Based on the decision been made, you must install appropriate Excel drivers using the links and guidance provided in the help topic. After drivers are installed, you should be able to use them from TestComplete (of matching bitness!) and access data from the Excel file.

    Note one more time: Excel application is not involved in this process, may be whatever version and you may use it in a usual way when you need it.

     

    Hope, the above made things more clear but feel free to ask for the things that left not clear enough.

  • Bob_Loblaw's avatar
    Bob_Loblaw
    Occasional Contributor

    Simply installing the 64 bit 2010 redistributable as described in the documentation enabled me to access the Excel file included in the tutorial. I removed nothing - just installed the redistributable and the DDT tutorials are working fine.

     

    Thanks for the help!

  • Bob_Loblaw's avatar
    Bob_Loblaw
    Occasional Contributor

    Relative newby here -

     

    I'm attempting to do a data loop from the tutorial and when I specify the included spreadsheet, I'm prompted to install the 64 bit version of Office 12.0 Access Database Engine OLE DB provider from Access 2010.

     

    I'm working on a brand new computer with a 64 bit version of Windows 10 with a brand new version of Office 365. When I go to the Microsoft site, the download instructions tell me to remove all versions of Access.

     

    I'm not uninstalling the Office 365 I just paid for and installed.

     

    Is there a workaround that will enable me to use Excel 2016 with TestComplete 12?

     

    TIA

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      The most probable reason of your problem is that you are trying to read Excel data using TestComplete (TC) 64-bit.

      The shortcut that is placed on your desktop after TestComplete install points to the 64-bit flavor of TC that is located in the <TestComplete>\x64\bin\ folder.

      At the same time, TC installer also installs 32-bit flavor of TC into the usual <TestComplete>\bin\ folder but does not create any shortcut to it.

      When you are accessing (Excel) data from TC via ADO (and this is how it is implemented in TC), the bitness of the master application and ADO providers (as well as ODBC drivers if your ADO connection string specifies them) must be the same.

      The problem here is that in 99% of cases, required 32-bit ADO providers are already present on the computer, while 64-bit versions are not. To make things even worse, 32-bit Excel providers cannot be installed side-by-side with 64-bit ones.

      With more details this is described here: https://support.smartbear.com/testcomplete/docs/general-info/system-requirements.html#additional-requirements

       

      So, what I would recommend is to try 32-bit flavor of TC and check if it works for you. (The functionality of 32- and 64-bit flavors of TC from the end-user's point of view is absolutely the same.)

      • Bob_Loblaw's avatar
        Bob_Loblaw
        Occasional Contributor

        Thank you for your reply.

         

        I ran the 32 bit version of TestComplete straight from the bin and made sure it said x86 on the splash screen when it loaded but I got the same error message when trying to connect to the Excel spreadsheet specified in the tutorial.

         

        I'm still looking for a way to perform a data driven test with Excel 2016 and TestComplete12.

    • shankar_r's avatar
      shankar_r
      Community Hero

      Hi,

       

      I also use Office 365 which is 2016.

       

      I have below function which will grab my excel data wherever you run.

       

      function fn_ExcelUsingADODB()
      {
            var ctExcelProvider64 = "Microsoft.ACE.OLEDB.12.0",ctExcelProvider32 = "Microsoft.Jet.OLEDB.4.0";
            var excelFileName = "<test data path>";
            var excelConnection = new Sys.OleObject("ADODB.Connection");
            
            var str_Connection = "Provider=" + (is64BitClient() ? ctExcelProvider64 : ctExcelProvider32) + ";Data Source = " + excelFileName + ";Persist Security Info=False;Extended Properties=Excel 8.0;"
            
            excelConnection.Open(str_Connection);
            
            var excel_recordSet = new Sys.OleObject("ADODB.Recordset");
            
            var excelQuery = "select * from [<sheetName>$]" ;
            
            excel_recordSet.Open(excelQuery, excelConnection);
            
            if(!excel_recordSet.bof)
            {
                  excel_recordSet.MoveFirst()
                  while(!excel_recordSet.eof)
                  {
                        for(var i=0; i!= excel_recordSet.fields.count; ++i)
                        {
                              Log.Message(excel_recordSet.fields.Item(i).name);
                        }
                        
                  }
            }
            excel_recordSet.Close();
            excelConnection.Close();
      }
      function is64BitClient()
      {
            var tcprocess = Sys.WaitProcess("Test*te", 0);
            
            if(tcprocess.Exists)
            {
                  if(tcprocess.ProcessType == "x64")
                  {
                        return true;
                  }
                  else if(tcprocess.ProcessType == "x86")
                  {
                        return false;
                  }
                  else
                  {
                        throw "Not able to grab the process type";
                  }
            }
            throw "Not able to find the TestComplete/TestExecute process";   
      }

      You have to install this x64 version access control if you want to use TestComplete as x64 bit.

  • NisHera's avatar
    NisHera
    Valued Contributor

    as per TC document "The ODBC driver does not support Excel 2007 - 2013." I think should be updated as 2007-2016

     

    You can use ACEDriver for XL 2016 (Put last parameter as 'true' )

     

    I'm running same configuration as yours with ACEDriver without problem.

    • Bob_Loblaw's avatar
      Bob_Loblaw
      Occasional Contributor

      Thanks for your reply. I am just doing the tutorial for data driven tests and have not yet got to the code window yet.

       

      From what I gather, without writing code - which I'm not opposed to doing, just haven't gotten there yet as I'm just beginning to use the tool - there isn't a way to use 64 bit Excel with TestComplete. Seems odd.

       

      Thanks again for your reply but I'm still looking for a solution.