Skip to content

Instantly share code, notes, and snippets.

@PrabhatKJena
Forked from hkuno9000/git-diff-excel.md
Created April 12, 2017 08:48
Show Gist options
  • Save PrabhatKJena/baee35361d60869bc3231931f2f6484f to your computer and use it in GitHub Desktop.
Save PrabhatKJena/baee35361d60869bc3231931f2f6484f to your computer and use it in GitHub Desktop.
How to git diff for MS-Excel files(xls/xlsx) on Windows-OS

How to git diff for MS-Excel files(xls/xlsx) on Windows-OS

  1. Download the xdoc2txt tool from: http://ebstudio.info/home/xdoc2txt.html#download
  2. extract "xdoc2txt.exe" and locate it on your PATH folder
  3. edit your gitattributes as A:
  4. edit your gitconfig as B:

A: append following texts to "~/.config/git/attributes" or ".git/info/attributes"

*.xls	diff=xdoc2txt
*.xlsx	diff=xdoc2txt

B: config "~/.gitconfig" or ".git/gitconfig"

git config [--global | --local] diff.xdoc2txt.textconv 'xdoc2txt.exe -8'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment