Command Line Parameters (CLI)
To simplify integration with other applications, xlCompare has command line parameteres, similar to other file comparison tools.
Compare two XLSX, XML or Text 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.
3-way comparison for XLSX, XML or Text 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 files and display comparison report with highlighted changes.
List of the 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.
-gui
Works only with GUI
-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 diff tool for XLSX,XML or Text files in other application.
After you've finished working with comparison report the application is closed.
-skip-wizard
Do not open the Comparison Wizard window for the files specified in the command line parameters.
-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.
Examples of using xlCompare with CLI
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.
To open xlCompare in the GUI mode for merge - add -gui switch to the command line.