I want to be able to compare 2 excel sheets in linux. I am not interested in converting them to csv format as they have a complicated formating that is not supported in csv. I would like to be able to have a graphical comparison (some sort of kompare way). The tool should be available in linux platform.

Any ideas ?

  • Whato do you want to compare? Content? Formatting? Both? Jan 5, 2012 at 17:20
  • Closest thing I can think of would be to import the sheets into OpenOffice/LibreOffice and then write a macro to do the comparison on a cell by cell basis. Jan 6, 2012 at 14:13
  • @Alien Life Form: I want to compare both, to be able to maintain a well construct excel document in CVS repository, and be able to compare two versions easily by calling a program command-line. Ideally this program can do the merging as well but that's another story ...
    – Debugger
    Jan 6, 2012 at 22:10
  • Tall order... I can think of no tool that can compare formatting on anything. Closest would be "semantic" xml comparison - so you could theoretically convert excel->(some intermediate well behaved fmt) then compare the neutral formats. I'm afraid you'd end up with a lot of cruft to contend with most of the time tho'. Jan 9, 2012 at 17:58

3 Answers 3


Open/LibreOffice has a comparison feature under Edit->Compare Document...

  • 1
    do you know if there's any way to open OpenOffice in this mode from the commandline? Jul 7, 2013 at 19:49
  • In the current version: Edit->Track Changes->Compare Document... Sep 3, 2022 at 3:41

If you have the time and know a bit of Perl you could create your own tool in an hour or two.

If XLS rather than XLSX, then example on the Spreadsheet::ParseExcel page will do a portion of that you want, walk every cell, sheet by sheet and row by row in a workbook, if you need the XLSX support see the links on the page.

Anyway a simple tweak to open a second workbook and you could create a tool that compares Worksheet names and the number, along with the maximum column and row counts in each Worksheet, a few min's, only outputting something if there's some inequality. You'll need some logic to match Worksheets on name, or number, or count of rows / columns within, as they may have changed the order / renamed).

Another quick hack and you could compare the Value and then the Format of every Cell in matching tow Worksheets.

Then it could get messy, say if on sheet has been re-sorted every cell may differ, so you may just want an error threshold, alternatively sort each worksheet before performing a cell comparison.


Presently I am not aware of any tools that you can use to compare excel files in linux; however, you could install wine, and then install a windows program and use that from within linux:


I have found it to be very useful. Then you could install WinMerge and xdocdiff:


Here are a couple other comparison programs you could install.

4TOPS-Compare-Spreadsheets formulasoft.com: excel-compare exceldiff

Please let me know if you have any trouble with wine, as I would be happy to help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .