Command Line Excel Comparison Examples

Command Line Excel Comparison Examples

Command line examples for comparing of XLS, XLSX, CSV etc.

command line Excel comparison example

Examples of Excel Comparison by Command Line

Have a question? Ask us! We love to help. !

Below are some examples to choose from. Select the example closest to what you require and modify it. If you have any trouble using these examples see:


Note:  if you don't specify a particular option in the command line, the option will default to whatever was last set in the user interface.


Example Details

Example 1

Compare two Excel worksheets

Example 2

Compare two Excel worksheets; specify sheet numbers

Example 3

Compare two Excel worksheets; specify sheet numbers, rows and columns

Example 4

Compare two Excel worksheets; create HTML report

Example 5

Compare two Excel worksheets; create TEXT report

Example 6

Compare two Excel worksheets; create CSV report


Example 1

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /L D:\A\compare.log

This command line instructs DiffDoc to:

  • Compare two Excel worksheets.
  • Generate a log file.

Because we don't specify which sheets or rows/columns to compare, the complete contents of the first sheet in each workbook will be compared.

 


Example 2

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /V /Y2 /Z2


This command line instructs DiffDoc to compare two workbooks, but only compare the second sheet.

/Y2 and /Z2 command 'Diff Doc' to compare the second sheet of the original file to the second sheet of the modified file.

The /V switch commands 'Diff Doc' to display a pop up message to report on the comparison. This is handy for debugging purposes.


Note: You can modify the /Y and /Z switches to compare  second and third sheets with /Y2-3 and /Z2-3 (or /Y2, 3 and /Z2, 3) .


Example 3

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /L D:\A\compare.log /Y2 /Z2 /1 12-24 /3 12-24

This command line instructs DiffDoc to compare two workbooks, specifying, not only which sheets, but also which rows to include in the comparison.

In this example, we specify rows 12-24 for both the Original and Modified Excel files with the /1 and /3 switches respectively. A log file is created with the /L switch to store the status of the comparison.


The /2 and /4 switches can be added to specify which columns to include in the comparison, as the /1 and /3 switches were used above.


Example 4

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /L D:\A\compare.log /T D:\A\Report.HTM /R1 /F1 /O /X

This command line instructs DiffDoc to compare two Excel spreadsheets and create a HTML (/R1) All In One style (/F1) report which opens (/O) and then closes 'Diff Doc' (/X).

A log file (/L) is also created.


Example 5

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /L D:\A\compare.log /T D:\A\Report.TXT /R2 /O /X

This command line instructs DiffDoc to compare two Excel spreadsheets and create a TXT (/R2) report which opens (/O) and then closes 'Diff Doc' (/X).

A log file (/L) is also created.


 


Example 6

DiffDoc /M d:\a\Descarte.xls /S d:\a\Plato.xls /L D:\A\compare.log /T D:\A\Report.CSV /R3 /O /X


This command line instructs DiffDoc to compare two Excel spreadsheets and create a CSV (/R3) report which opens (/O) and then closes 'Diff Doc' (/X).

A log file (/L) is also created.



See Also: