Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 ?

share|improve this question
    
Whato do you want to compare? Content? Formatting? Both? –  Alien Life Form Jan 5 '12 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. –  ConcernedOfTunbridgeWells Jan 6 '12 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 '12 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'. –  Alien Life Form Jan 9 '12 at 17:58

3 Answers 3

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

share|improve this answer
    
do you know if there's any way to open OpenOffice in this mode from the commandline? –  Nathan Fellman Jul 7 '13 at 19:49

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.

share|improve this answer

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:

http://www.winehq.org/

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

http://freemind.s57.xrea.com/xdocdiffPlugin/en/index.html

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.