Skip to content

ishariful955/git_diff_xlsx

 
 

Repository files navigation

git_diff_xlsx Build Status

This script parses an .xlsx file and converts it into a text format which can be compared using git.

I wrote this script as I wanted to use a version control package for managing an existing computational model, the input files of which are defined using Microsoft Excel workbooks.

See my blog entry for more details of how it works.

Installation

  1. Download the latest release
  2. Run python setup.py install
  3. Add the following lines to the global .gitconfig file:
    [diff "git_diff_xlsx"]
    binary = True
    textconv = parse_xlsx
    cachetextconv = true
  1. Add the following line to your repository's .gitattributes file *.xlsx diff=git_diff_xlsx
  2. Now, typing git diff at the prompt will produce differences between text versions of Excel .xlsx files

Caveats

There are a bunch of issues with this script. I wrote it to fulfil a need I had then and there and there are lots of hard-coded horrors. Please feel free to contribute to cleaning up the code, submit issues and pull-requests.

About

Converts a Microsoft Excel 2007+ file into plain text for comparison using git diff

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%