See Differences between Office Document Revisions in Subversion
- Enterprise Edition
- Professional Edition
- Trial Edition
Unlike most Source Control Managers, Subversion does come with a script for diff'ing Excel workbooks. This script looks at the Excel Workbook structure and doesn't examine changes in the VBA. If you find that your Excel development is more geared to VBA work than spreadsheet work, you will find VbaDiff to be a more useful diff tool. Once you have selected VbaDiff as your external diff tool, you can quickly see the code differences between revisions.
In this example, I'll assume that you're using TortoiseSvn:
2. In Windows Explorer, right-click on a repository area. From the context menu, select TortoiseSvn -> Settings.
3. From the settings windows, select External Programs - Diff Viewer.
4. In the right-hand pane of the Settings window, click on the button that says "Advanced...".
5. You should now be looking at a dialog window called 'Advanced diff settings'. Select the .xlsx extension and then click the Edit. button.
6. The "Edit extension specific diff program" window will appear. In this window:
- Keep the Extension as .xlsx.
- Change the External Program field to point to the VbaDiff executable, plus the %base and %mine arguments, e.g. "C:\Program Files\VbaDiff\VbaDiffLoader.exe" %base %mine
7. Add the other macro-enabled file extensions as required, e.g. .xla, .xls, .xlam.
8. Click OK and the Advance Diff Settings window will close. Then be sure to click Apply on the Settings window to save your changes.
9. You can now close the Settings Window.
To test what you've just done:
1. Find an Excel workbook that contains VBA macros and is under source control in Subversion.
2. Right-click on the file. In the context menu, select TortoiseSvn -> Diff with Previous Version.
3. Select a previous version to compare to. Subversion will then open both version and show you the differences. Remember that you can double-click to open each code module in a text diff utility.