Nathan Fellman
Nathan Fellman

Reputation: 127458

Is there any linux based diff tool for Excel files?

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

Answers (4)

Martin Thoma
Martin Thoma

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:

enter image description here

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 interesting
  • core.xml: Metadata about the document like the author, creating program, the time it was created
  • xl/: All of the data including diagrams and especially the worksheets

Upvotes: 0

SANKET RAHANE
SANKET RAHANE

Reputation: 1

you can do with "xls_diff -diff xls1 xls2"

Upvotes: 0

Rusty75
Rusty75

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

gdshepherd
gdshepherd

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

Related Questions