Announcement

Collapse
No announcement yet.

Use BC from excel

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • nilesh.lamjane
    started a topic Use BC from excel

    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.

  • Aaron
    replied
    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.

    Leave a comment:


  • nilesh.lamjane
    replied
    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.

    Leave a comment:


  • Aaron
    replied
    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.

    Leave a comment:

Working...
X