Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Post Use BC from excel

    Hi,
    I want to open BC from excel. Could you please guide me.

    I am doing an automation in which i ll need to open BC by a click from Excel.
    I need to pass left and right file to it parameters , file path store in cells.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,899

    Default

    Hello,

    I believe this is more of a request for Excel Macro help. I'm not as familiar with Excel, but I can help with the BC3 command line.

    BC3's command line is:
    bcompare.exe "c:\folder\file1.txt" "c:\folder\file2.txt"

    You can test this quick from the Windows Command Prompt.

    If you have file paths in your Excel document, and can call a macro to the command line that passes the file paths, this should work. You should probably add "quote" characters around the file paths during the command line call, because if the file path has any whitespace you will need the quotes around them.

    Are you planning on calling many file compares at once or just one compare at a time? If many, you may want to use bcomp.exe instead of bcompare.exe.
    Aaron P Scooter Software

  3. #3
    Join Date
    Jan 2013
    Posts
    2

    Default

    Thanks Aron, But here, i dont want to run it from cmd line or java code[I am able to do it using both methods]....

    My main concern here is to create a hyperlink which will open the beyond compare and open the leftFile and rightFile.


    Something like this:
    file:///D:/BeyondCompare/bcompare.exe?leftFile=d:/abc.txt&rightFile=xyz.txt

    I am not sure how to make sure [?leftFile=d:/abc.txt&rightFile=xyz.txt] this part to be work.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,899

    Default

    Hello,

    I did some searching and found that in newer versions of Excel there is an option to link to a file on your harddrive using the Insert tab -> Hyperlink button.

    I was able to use this method to launch BC3, but I could not configure it to accept the command line parameters ("c:\abc.txt" and "c:\xyz.txt"). You would need to find the Excel syntax to allow the full command line ("d:\BeyondCompare\bcompare.exe" "d:\abc.txt" "d:\xyz.txt"), with spaces in the appropriate places, to call bcompare.exe and have it open in the Text Compare.
    Aaron P Scooter Software

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •