docdiff: Viewing file differences in Excel, says "Same file name"
Created originally on Bitbucket by banjobeni
I am using TortoiseHg version 3.8.3.
When versioning an excel .xls oder .xlsx file, it is not possible to view a diff by using Visual Diffs and then choosing tool docdiff. The way Visual Diff creates temporary files, it will always be the case that the filenames are identical. There seems to be some magic here that creates a renamed copy of one of the input files in case the file name is the same (in my case 'output.xlsx') and the filename contains "xls".
So one of the files is successfully copied to "output.xlsx~x1" and then used as one of the files to be diffed. But it seems this rename is not sufficient in order to be able to compare the files:
I tried renaming the file to "output.~1.xlsx" instead and then, using the folling command line, excel pops up and shows the differences.
#!batch
C:\Users\ber.SMA\AppData\Local\Temp\thg.7et_ma>docdiff "xlsdifftest.3.1\output.~1.xlsx" xlsdifftest.3.2\output.xlsx
Changing the file name pattern in the above linked script might be a fix for this issue.