LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2008, 05:02 AM   #1
prakash.akumalla
Member
 
Registered: Jun 2008
Location: India
Posts: 109

Rep: Reputation: 15
Thumbs up Can we compare two excel sheets?


Hi,

I have two compare two excel sheets in linux system. Do we have any command in shell or perl which can compare two excel sheets ( may be normal or csv files).

Can any one help me in writing a script which can compare two excel sheets?

Any help appreciated.

Thanks,
Prakash.
 
Old 10-17-2008, 06:57 AM   #2
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
If you save them in CSV format, you can use diff to compare them

Code:
diff file1 file2
"man diff" will give you all the options.
 
Old 10-28-2008, 01:08 AM   #3
m_w_sundaram
LQ Newbie
 
Registered: Feb 2004
Location: YERCAUD
Posts: 6

Rep: Reputation: 0
cmp command

You can also try with cmp command to compare any two files
 
Old 10-28-2008, 11:22 PM   #4
prakash.akumalla
Member
 
Registered: Jun 2008
Location: India
Posts: 109

Original Poster
Rep: Reputation: 15
Thumbs up

I have tested both diff and cmp earlier, but they did not satisfy what i require.

diff command only said that there is difference in two excel sheets.

cmp command only says that they differ in line 3 or 4 or etc.
It only says the first difference.

But what I require is that it should point all the differences in the excel sheet.

Please help me in doing so.

Thanks,
Prakash.
 
Old 10-28-2008, 11:58 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
diff will output all differences; if you have CSV
that should work just fine. Bear in mind that you'll
need to export individual sheets from a workbook.
 
Old 10-29-2008, 12:41 AM   #6
prakash.akumalla
Member
 
Registered: Jun 2008
Location: India
Posts: 109

Original Poster
Rep: Reputation: 15
Hi,

I checked it my modifying two lines from one csv file and renamed it. Checked the command diff then.

The output is "Binary files MasterExcel.xls and MasterExcel1.xls differ"

But it did not display where the difference is and how many differences are actually.

Thanks,
Prakash.
 
Old 10-29-2008, 12:51 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
You are comparing the binary .xls formats. Export the sheets to .csv files first. Diff is used to compare text files.
 
Old 10-29-2008, 01:48 AM   #8
prakash.akumalla
Member
 
Registered: Jun 2008
Location: India
Posts: 109

Original Poster
Rep: Reputation: 15
Hi,
Thanks for your reply. I checked with csv files. It worked.

Prakash.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing A3 size using A4 sheets hcgrant Linux - Software 6 09-30-2016 10:55 AM
style sheets... in konqueror? patolfo Debian 1 09-23-2006 01:58 PM
Amarok 1.4 and cue sheets wetnose23 Slackware 1 05-24-2006 03:08 AM
Emailing Excel sheets from Linux stash1071 Linux - General 10 03-13-2006 12:49 PM
create contact sheets SharpyWarpy Linux - Software 1 06-04-2003 04:32 PM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration