I have to compare values of two excel sheets cell by cell.
can anybody suggest me how to do it?
In advance Thanks.
can anybody suggest me how to do it?
In advance Thanks.
use strict; use warnings; use Spreadsheet::ParseExcel; use Spreadsheet::WriteExcel; my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->parse('C:\\Documents and Settings\\atol\\perl_test\\file.xls'); print $workbook ,"\n"; my $parser1 = Spreadsheet::ParseExcel->new(); my $workbook1 = $parser->parse('C:\\Documents and Settings\\atol\\perl_test\\file1.xls'); print $workbook1 ,"\n"; if ( !defined $workbook ) { die $parser->error(), ".\n"; } for my $worksheet ( $workbook1->worksheets()) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( $row_min .. $row_max ) { for my $col ( $col_min .. $col_max ) { my $cell = $worksheet->get_cell( $row, $col ); my $cell1 = $worksheet->get_cell( $row, $col ); next unless $cell and $cell1; my $data = $cell->value(); #print $data; my $search = $cell1->value(); print $search; } } }
for my $worksheet ( $workbook1->worksheets())
Comment