Forum Discussion

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    It might help if you let us know what line of code triggers the error.

    From the error text, it looks like that the code attempts to create object with some classID and this classID is not registered in the given operating system and thus the OS cannot create the requested object.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      The error you've reported typically comes to calling Sys.OleObject('<classID>') where the <classID> specified, for some reason, does not exist in the registry of the machine on which you are running the test as per AlexKaras.  In looking at your code, the only place I see a call like that is in Event_Script.svb where you are making calls to

       

      Sys.OleObject('Excel.Application')

      So, my suspicion is that, on the machine that you are using to run your tests, Excel is not installed or, if it is, it has not been properly installed where the registry is updated.

  • sanjay0288's avatar
    sanjay0288
    Frequent Contributor

    Hi,

      In the event code provided by you there is an error in filename.

      Here you are trying to append your project suite path  along with a absolute path to your excel file. Hence there is an error


      Set App = Sys.OleObject("Excel.Application")
      FileName = ProjectSuite.Path + "C:\Users\GSS\Documents\TestComplete 12 Projects\Gayatri\LVGI_Engg_CAR_EAR_New\LVGI__Engg_DataSheet.xls"

      log.Message("FileName")
      Set WorkBook = App.Workbooks.Open(FileName)
     

    For example if you have placed your testcomplete project suite in "D:\Test" folder then as per your code FileName will have

    "D:\TestC:\Users\GSS\Documents\TestComplete12Projects\Gayatri\LVGI_Engg_CAR_EAR_NEW\LVGI_Engg_DataSheet.xls"

    Hence you would get an error

    • sanjay0288's avatar
      sanjay0288
      Frequent Contributor

      In addition to my previous reply please check whether excel is installed and also try using COM connection CreateObject("Excel.Application")