Comparing text files is easy, but comparing Excel files not so much. The fact that Excel is a two dimensional grid with formulas that contain relative cell references makes it quite a challenge. Accordingly, there are only a few tools available that claim to do the job. Let’s see what our options are! In the first part of the post, we’re comparing the features of the tested tools before we get into the details of how well each tool is doing with regards to our test case scenario.
|Supported File Formats|
|Runs on Windows|
|Runs on Mac|
|Runs on Linux|
|Works without Excel|
|Type of Software||Browser app||Excel add-in||Desktop app||Desktop app||Desktop app|
|Company||Zoomer Analytics||XL Consulting||Microsoft||SpreadsheetTools||DiffEngineX|
We’re starting with a simple Workbook (sales_plan_v1.xlsm) with some merged cells and a few lines of VBA code. We then create a second version (sales_plan_v2.xlsm) of the workbook by introducing the following changes:
Disappointingly, merged cells and column/row operations make most of the tools unusable as only two (xltrail and Synkronizer) manage to show the correct changes without manual intervention or without ignoring a change or introducing noise, i.e. a set of changes that makes it hard to understand what’s going on.
Green means that the change has been properly recognized.
|Change Cell D12|
|Insert Row 11|
|Delete Col F|
|VBA module added|
|VBA module changed|
|Comments||Shows spurious changes both for rows and VBA modules||Requires to manually set a col/row "primary key" for each sheet|
xltrail is a web based tool similar to GitHub that doesn’t just compare 2 Excel files but also keeps a version history of them.
It presents changes between two versions in an overview page with all the VBA code changes on a single page (red means old/deleted while green means new/added):
The sheet differences are presented in a unified view with a list of changes on the side bar on the right hand side:
For a step-by-step tutorial on how to use xltrail to compare two files see my other blog post
Apart from xltrail, Synkronizer is the only tool that gets all the changes on the sheet correctly without manual intervention. It shows them by arranging the original workbooks next to each other and changing the colors of the cells (in both files):
It feels a bit irritating though that Synkronizer changes the original files by applying the color coding, so when you close them, you get asked if you want to undo the highlighting:
Spreadsheet Compare is a free desktop app, but it is only included in specific versions of Microsoft Excel (Office Professional Plus since version 2013 and Office 365 ProPlus). It can also be started via the Inquire add-in from within Excel.
While it does recognize that row 11 was inserted, it adds noise around it (
Deleted Row 12 and
Added Row 13). It misses the cell change and also introduces cryptic text for the VBA part of the new sheet (
Finally, while you do get a diff for VBA (a single module only at a time), there’s room for improvement with regards to the visual representation:
xlCompare seems to be getting confused because of the merged cells and row/columns operations. For this example, the sheet diff view doesn’t seem to make any sense and a long list of changed cells is presented:
On the VBA side, it does a good job by showing a nice diff for the changed module and listing the new module correctly, too:
If column/row operations are involved, DiffEngineX requires you to select a “primary key” for each sheet and for both, rows and columns. This is clearly not scalable if you ever need to compare a workbook with more than one sheet (or a few workbooks):
By selecting the right columns (
B/C) and rows (
5), DiffEngineX manages to show the correct differences:
But don’t you dare to select the wrong key or you won’t be able to make sense out of the comparison anymore! The following screenshot shows the effect if you select only column
B instead of
C toghether as the column key:
Additionally, DiffEngineX produces a report in Excel with all the changes:
Excel files are difficult to compare (stay tuned for a future blog post that looks more into the details of why that is) and accordingly, good tools are hard to find. Please leave a comment if you are using any other tools for comparing Excel files!