Forum Discussion

synchi64's avatar
synchi64
Occasional Contributor
5 years ago

objSpread2 missing error in "excelcompare"

after installing the "Compare Excel files" (https://support.smartbear.com/viewarticle/9046/) and trying to run it, i was faced with an error saying that the "objSpred2" was missing and i can't find any fix for it, does anyone has any clue on what causes the error and how to fix it?

  • synchi64 :
    Hi,

     

    a) Your screenshot references ExcelCompare.tcx script extension, while the referenced help article talks about ExcelSheetCompare.tcx one;

    b) Script extensions are .zip archives, so you can open them and examine their internals to understand the source of the problem;

    c) objSpread2 variable in the ExcelCompare.tcx script extension is initialized with this line of code:

    Set objSpread2 = objExcel.Workbooks.Open(secondFile)

    So for me it looks like that Excel failed to open secondFile file and thus you got an error that objSpread2 object is required later in script extension code.

     

    • synchi64's avatar
      synchi64
      Occasional Contributor

      i tested both excel links, both links are correctly typed, the error occurs when the comparison starts,

      as for the "rebuild your own" i'm not sure how to go about it, do i try to create a script to export from the code in the link or am i missing somthing?

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    synchi64 :
    Hi,

     

    a) Your screenshot references ExcelCompare.tcx script extension, while the referenced help article talks about ExcelSheetCompare.tcx one;

    b) Script extensions are .zip archives, so you can open them and examine their internals to understand the source of the problem;

    c) objSpread2 variable in the ExcelCompare.tcx script extension is initialized with this line of code:

    Set objSpread2 = objExcel.Workbooks.Open(secondFile)

    So for me it looks like that Excel failed to open secondFile file and thus you got an error that objSpread2 object is required later in script extension code.

     

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      note: If any excel sheet is open and in use when it is tried to be opened by the comparison extension, that may generate that same error.  So, make sure you've closed all copies of the excel sheet before you run the comparison.

      • BenoitB's avatar
        BenoitB
        Community Hero

        BTW, this script should be improved, bad error management ;(

    • synchi64's avatar
      synchi64
      Occasional Contributor

      i figured it out, thanks to all of you, thank you very much, it turns out that the script apparently didn't installed itself properly

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Thank you for the update and good to know that the problem is solved.

         

        when i download the script, they don't apear as zip files, but as ".tcx" files

        Script extensions are .zip files with .tcx extension. Either open them as zip archives or change extension to .zip to examine their internals and revert back to .tcx when done.

         

    • synchi64's avatar
      synchi64
      Occasional Contributor

      i do have both excel and access installed on the computer