xlCompare Command Line Parameters

To simplify integration with other applications, xlCompare has command line parameteres, similar to other file comparison tools.

General Command Line Syntax

Compare two Excel Files

xlCompare.exe [file1] [file2]
xlCompare.exe /mine:[file1] /base:[file2]
xlCompare.exe /1:[file1] /2:[file2]
Open 2 files - FILE1 (left workbook) and FILE2 (right workbook) in xlCompare, compare and display color-coded difference report

Three-way comparison for Excel Files

xlCompare.exe [file1] [file-base] [file2]
xlCompare.exe /mine:[file1] /base:[file-base] /their:[file2]
xlCompare.exe /1:[file1] /2:[file-base] /3:[file2]
Open 3 files - FILE1 (left excel file), FILE2 (right excel file) and their BASE version in xlCompare. Perform 3-way comparison for the selected workbooks and display comparison report with highlighted changes.

Additional Command Line Options

If you need to perform more complex actions in your source control system, please, use the options below. With them you can test the changes made before committing your workbook. This should keep you safe from errors in data and formulas, which could produce a big lossed for your company. Make your commits risk-free!
/merge
Open workbooks and perform automatic merge. In case of conflicts merge operation fails and you get conflict list on the screen.
/console
Work in the console mode without interface.
/one_panel
Start xlCompare with left panel only. Right panel is hidden.
/quit_on_close
Close the xlCompare application, after you exit from the comparison mode. This option is useful for using xlCompare as excel diff tool in other application. After you've finished working with comparison report the application is closed
/testConflicts
Test passed workbooks for possible conflicts in the merge operation.
/titleMine:[title string]
/title1:[title string]
Use this title instead of path to the FILE1 (left workbook). You can use this option in order to specify alternate path. When file was downloaded from repository into temporary folder, this option allows to display "readable" file name.
/titleBase:[title string]
/title2:[title string]
Use this title instead of path to the BASE workbook. You can use this option in order to specify alternate path. When file was downloaded from repository into temporary folder, this option allows to display "readable" file name.
/titleTheir:[title string]
/title3:[title string]
Use this title instead of path to the FILE2 (right workbook). You can use this option in order to specify alternate path. When file was downloaded from repository into temporary folder, this option allows to display "readable" file name.
/output:[file path]
After merge command is completed, results are saved in the file, specified in the file-path parameter.
/r:[report-file]
Save comparison report in the file, specified in the report-file parameter.

Batch Excel File Comparison

Use this mode to compare several excel files in one go and get the comparison report for all processed files. You can use it from the bat file or from any other application, that allows to call xlcomparator.
/batch
Use xlCompare in BATCH mode. In this mode application compares set of excel files passed to the input and saves diffrence report in the XLSX file (as output).
xlCompare expects following command line syntax:
xlCompare.exe /batch /console [file-path] /r:[report-file]
Where the file-path argument specifies path to workbook that contains list of compared pairs of excel files.
This could be:
  • XLSX file. First column on the first sheet contains left file, second column on the first sheet contains right file.
  • CSV or Text file. Every row must contain two excel files. In case of TXT file, values must be delimited with text file separator, selected in the xlCompare options.
Real example looks like this one:
xlCompare.exe /batch /console "c:\Invoices\2019\complete-list.xlsx" /r:"c:\Reports\invoice-report-2019.xlsx"
xlCompare.exe /batch /console [file-list-1] [file-list-2] /r:[report-file]
file-list-1 argument specifies list of the excel files to be compared on the left side.
file-list-2 argument specifies list of the excel files to be compared on the right side.
This could be:
  • XLSX file. First column on the first sheet contains path of the excel file to be compared.
  • CSV or Text file. Every row must contain path to excel file.
Real example looks like this one:
xlCompare.exe /batch /console "c:\Invoices\list-2018.xlsx" "c:\Invoices\list-2019.xlsx" /r:"c:\Reports\invoice-report-2019.xlsx"
In this case saved diffence report contains information about all processed files.

Example of the xlCompare command line

Intergate xlCompare into the Tortoise SVN

xlCompare.exe %mine %base /quit_on_close

Compare 2 Excel files and create report

xlCompare.exe "C:\Documents\File1.xlsm" "C:\Documents\File2.xlsm" /r:"C:\Documents\Report.xlsx"
xlCompare compares File1 vs. File2 and writes difference report into Report.xlsx.
If there are no differences - Report.xlsx is an empty workbook with one worksheet named Sheet1. Otherwise it will contain worksheets with differences.
In this mode xlCompare doesn't show GUI. Application works as console command.

Merge 2 Excel files

xlCompare.exe /merge "C:\Documents\File1.xlsm" "C:\Documents\File2.xlsm" /output:"C:\Documents\Result.xlsx"
xlCompare compares File1 vs. File2 and merges all the modifications from File1 into File2.
After merge operation File2 is saved under the name Report.xlsx
If /output parameter is missed - File2.xlsm is saved by xlCompare.
In this mode xlCompare doesn't show GUI. Application works as console command.

I need assistance to use xlCompare

Please, describe your question or inquiry in the form below. We will be happy to respond you!
Go to top