No announcement yet.

Excel comparison

  • Filter
  • Time
  • Show
Clear All
new posts

  • Excel comparison


    I am a noob to Beyond Compare 4

    I see that you have Beyond Compare 3 and 2 Forums but nothing dedicated to Beycond Compare 4.

    Is it possible to start a folder for Beyond Compare 4?

    Also can you give me an example of a script used to check 2 Excel 2010 files and see if there is a difference and produce a report of these?

    Also what script editors are users finding they like most to use while setting up scripts?


    Last edited by SHOWMETHECODE; 26-Apr-2016, 02:58 PM.

  • #2
    There are already forums for Beyond Compare 4, you posted as a reply to an existing topic in the Beyond Compare 4 General discussion forum. I moved it to its own thread in the scripting forum.

    Here's an example script to compare two Excel files using Beyond Compare 4:

    data-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:c:\report.html output-options:html-color c:\file1.xlsx c:\file2.xlsx

    To run the script, use the command line:
    "c:\program files\beyond compare 4\bcompare.exe" "@c:\script.txt"

    The @ character makes Beyond Compare run a file as a script rather than load it for interactive comparison.

    See the "Using Beyond Compare > Scripts" and "Scripting Reference" topics in Beyond Compare's help file for more on scripting.

    When writing a script, you can use any text editor. If you don't want to install additional software on your machine, you can use Notepad, if you want a more powerful free editor, Notepad++ is pretty popular. You can also edit text files in Beyond Compare using the "Tools > Edit Text File" command.
    Chris K Scooter Software


    • #3
      Originally posted by Aaron View Post

      No problem. Let's see if I can help with each of these:

      1) Load the snapshot in a new, blank Folder Compare. Then use Edit menu -> Expand All, then Search -> Find Filename.

      2) BC4 does not support duplicate searching for files on the same side. The Folder Compare aligns folders on the left and right based on the folder names, and the files inside based on the file names. You can ignore the folder structure and align equal file names on the left and right (regardless of folder structure), but if there are multiple of the same file this may not align the correct pair since we align first before running the compare scan.

      3) Drag and drop is not supported in BC4. You can use the Copy To Folder or Move to Folder commands, or right click -> Explorer to use those commands.

      4) Could you post the text of the log command? We usually try to include the reason in the log or pass back the error pass from the OS. We use the same base copy method as Explorer; if you attempt the same copy (file, source, and destination) are there any extra prompts or error dialogs?
      Hello Aaron,

      Thank you for your prompt reply.

      Here is the code from an example I found on the web:

      load %1 %2
      expand all
      select all.files
      file-report layout:side-bys-de opitons:display-mismatches output-to:%3


      load %1 %2
      expand all
      select all.files
      file-report layout:side-by-side options:display-mismatches output-to:%3
      Now you can create a batch file and write something like this:

      "C:\Program Files (x86)\Beyond Compare 3\" @myscript.txt file1.txt file2.txt Save.txt /silent

      How can I do something similar like this in Beyond Compare 4?


      • #4

        Yes, scripting is very similar between versions of Beyond Compare, and you can script a solution for generating a report.

        However, as an automated action, script offers no preview of what is about to occur and no user interaction to tweak behavior. The /silent flag also suppresses all dialogs or errors. It would be very difficult to learn and troubleshoot this way.

        I would suggest first working with the graphical interface, as script actions mirror the same steps (loads, clicks, actions) that you take in the interface, but offers more feedback and information. You can open a new Table Compare in BC4, then load your two Excel files, then use the Session menu -> Table Compare Report dialog to pick the options of the report. Once you have a report you like, we can then create a similar script that acts on all excel files within a specific folder pair or on a specific pair of Excel files. Using the graphical interface will also let you see if our default alignment (Column 1 is the Key column) works for your files, or if this needs to be customized before generating reports.

        Our trial is fully featured, and you can download it here before any purchase is necessary:

        And we have some helpful overview videos here:

        If you need help configuring the Table Compare to align data or generate the report, let us know. If the Report is generated and good for that single pair of files, let us know which options you used in the Table Compare Report dialog (Layout, Output type, etc) and we can help with the script which corresponds to those options on a pair of folders.
        Aaron P Scooter Software