How to use Perl to compare two Excel files cell by cell and print the differences
For Example:
File 1:
Column a: 1, 3, 5
Column b: 6, 7, 9
File 2:
Column a: 1, 3, 5
Column a: 6, 7, 8
Output: Mismatch in column b, 3rd row
Please help me out doing this, I am very new to perl
• 3,207 views
•
link
1 answer
If you want to learn perl, check out this thread. If you want to have it just solved quickly for you, then here comes some lazybioinformatics:
Put the two sheets within one file, then a third sheet that every cell says:
=if(Sheet1.A1-Sheet2.A1=0,NA,MISMATCH)
Then do a 'find all' search (control-H) for the word 'MISMATCH' and copy-paste out the cell positions. Don't know what you'd do with the cell positions though, rather than headers and rownames....
NOT THE RECOMMENDED WAY OF DOING ANYTHING
• 0 views
•
link
Log in to answer this question.
Are these truly Excel files (in .XLS, XLSX format), or are they CSV or some other text format? If it's the latter this will become a much easier problem to solve.
Hello subramaniac41!
We believe that this post does not fit the main topic of this site.
Not a bioinformatics question
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!