Reputation: 127458
The project I'm working on uses Bitkeeper for version control. I am working on a new feature which involves translating a definition that is in an Excel spreadsheet (edited by an architect) to executable code (which until now has been manually done by a programmer). This Excel file must be part of the code repository, as different branches may have different definitions that will eventually have to be merged.
Bitkeeper does a good job of merging text files. Excel spreadsheets, however, are binary files, which Bitkeeper doesn't know how to handle. Bitkeeper does enable me to merge changes using external tools (external to Bitkeeper, that is). I am looking for a diff tool that works in Linux and can compare and merge Excel spreadsheets.
Are there any tools that will do this?
Upvotes: 5
Views: 6611
Reputation: 136379
How to create a diff for Excel files a.xlsx
and b.xslx
using meld:
# Extract the contents of the excel files:
unzip a.xlsx -d a-contents
unzip b.xlsx -d b-contents
# Compare the two folders:
meld a-contents/ b-contents/
In my case, it looked like this:
You can see that the app.xml
and the core.xml
have differences and compare them.
The most important parts of xlsx format:
app.xml
: Metadata about the creating app; mostly not interestingcore.xml
: Metadata about the document like the author, creating program, the time it was createdxl/
: All of the data including diagrams and especially the worksheetsUpvotes: 0
Reputation: 527
.xlsx is nothing more than a compressed collection of XML files, you could unzip them and then diff the files.
e.g. unzip test.xlsx -d unzipped
Upvotes: 4
Reputation: 66
You have to options that I am aware of. You can either convert the file to a .csv text file and parse the file using awk/sed or such, or you can use a programming language of your choice to open and modify the spreadsheets. For example, Python has Excel modules - http://www.python-excel.org/.
Upvotes: 0