isaac has asked for the wisdom of the Perl Monks concerning the following question:

I have two excel sheets both contains roll number and the marks of a class. Now in the next fall, three students got admission and the marks that they got also got revised. how to track the changes in the marks and the new students. How do i do this with using perl

Replies are listed 'Best First'.
Re: Comparing Two excel
by Corion (Patriarch) on Apr 07, 2014 at 09:17 UTC
Re: Comparing Two excel
by Tux (Canon) on Apr 07, 2014 at 14:17 UTC

    What Corion said, plus probably using export to CSV (or use the xls2csv utility that comes with Spreadsheet::Read) of both Excel files and then use the csvdiff utility that comes with Text::CSV_XS.

    $ xlscat -c old.xls "Student ID",Name,Test,Grade 1,"Tom Hanks",Math,F 2,"Angelina Jolie",Biology,B 3,"David Gilmour",Music,A $ xlscat -c old.xls >old.csv $ xlscat -c new.xls "Student ID",Name,Test,Grade 1,"Tom Hanks",Math,B 2,"Angelina Jolie",Biology,B 3,"David Gilmour",Music,A 4,Bono,Singing,"F- (EPIC FAIL)" $ xlscat -c new.xls >new.csv $ csvdiff old.csv new.csv # csvdiff < old.csv > new.csv < 1,"Tom Hanks",Math,"F" > 1,"Tom Hanks",Math,"B" + 4,Bono,Singing,"F- (EPIC FAIL)"

    When using csvdiff in a TTY, it'll try to use colors to make changes more obvious.


    Enjoy, Have FUN! H.Merijn