Script reports unable to create ActiveX object

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MidnightDragon
    Visitor
    • Jun 2008
    • 6

    Script reports unable to create ActiveX object

    Console command issued in a console window while logged in:
    DoBackup.cmd common.bc

    DoBackup.cmd file:
    "C:\Program Files (x86)\Beyond Compare 3\BCompare.exe" "@%1"

    common.bc file:
    log normal "Common backup %date% %fn_time%.log"
    load "\\rabbit\common" "\\squirrel\backups\server-backups\rabbit\common"
    filter -*.~*;-.*;-SyncToy*.dat;-.*\
    criteria timestamp:2sec;IgnoreDST rules-based
    option confirm:no-to-all
    expand all
    select all
    folder-report layout:side-by-side options:display-mismatches title:"Normal common backup on %date%" output-to:"Common backup %date% %fn_time%.detail"
    sync create-empty mirror:left->right

    While this runs a window appears and the last line in the log is the "expand all" line.

    A second windows appears which is an error from Windows Script Host, saying ActiveX component can't create object 'Excel.Application' and refers to the script XLS_to_TAB_Single.vbs in the BC3 Helpers subfolder.

    This is all running on a Windows Server 2008 R2 Standard machine that does not have Excel installed.

    Why does this happen? It appears that BC3 is using this helper but I don't know why.

    What can I do?
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Rules-based criteria uses Microsoft Excel to compare Excel files. If your folders compare Excel files and Excel isn't installed, then you'll get this error.

    To avoid this, remove rules-based from your comparison criteria.
    Chris K Scooter Software

    Comment

    • MidnightDragon
      Visitor
      • Jun 2008
      • 6

      #3
      Ah, yes. I missed that entry. Will try again.

      Thanks for quick help!

      Comment

      • snidely.too
        Expert
        • Jul 2008
        • 80

        #4
        Originally posted by Chris
        Rules-based criteria uses Microsoft Excel to compare Excel files. If your folders compare Excel files and Excel isn't installed, then you'll get this error.

        To avoid this, remove rules-based from your comparison criteria.
        Or un-check the particular rule? (That requires saving a session to load in the script, doesn't it? But it may be that MidnightDragon has other rules that considered desirable.)

        /dps

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16026

          #5
          That could work as well, and would revert to the <default> Text file format or Hex Compare, depending on the type of Excel file.
          Aaron P Scooter Software

          Comment

          • snitey
            New User
            • Nov 2016
            • 2

            #6
            Hello Chris,

            B&C is running the XLS_to_TAB_Single.vbs script file when iterating through a set of Excel Files via a C# application using bcomp.exe. I've removed the rules-based from my comparison criteria and still having this issue. This is happening intermittently throughout the set of Excel files. It can error out at the first few files or at the middle of the set. It's erroring with a Windows Script Host on line 19, Char 1, Error: ActiveX component can't create object: 'Excel.Applicaiton'; Code: 800A01AD, Source: Microsoft VBScript runtime error.

            I'm using ClosedXML to do my excel file worksheet extraction that places each worksheet into its own workbook so that I can compare each worksheet of each source workbook. I've installed the BCFormats.bcpkg extension for comparing the ClosedXML excel generated files. Seems to work in the GUI, but I'm only doing one at a time rather than running an iteration of files.

            Does this script use the Microsoft Excel Interop - Microsoft's Office Automation COM? I've had issues running this in the past. I'm running on Enterprise Windows 7 OS. I have the latest version of B&C; v4.1.9.

            Any help is appreciated!!
            Thanks!! Rob

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16026

              #7
              Hello,

              Our default Excel support is pre-installed in BC4 and does not use your install of Excel.

              If you've downloaded and installed an Excel File Format, this is probably one that does use the current install of Excel. This calls to Excel to open and save the current sheet as a temp .txt file.

              If you go to the Tools menu -> File Formats dialog, we list every installed format. The topmost "Excel" format would be the one used automatically by script. If you disable (uncheck) the version which uses Excel, does reverted to the default behavior work for your files?
              Aaron P Scooter Software

              Comment

              Working...