1, 23,45, 454,54,45,656,56,565,65,.... 2,343,4545, 5656,56,6767,67,6,767,6,76,767,... 3,454, 56546,4545,6,45,64,5,45,4,5,4,54,54,5,4,... #### #!/software/bin/perl BEGIN { unshift @INC, '/nfs/users/nfs_d/dmb/perl/lib' ; unshift @INC, '/nfs/users/nfs_d/dmb/perl/lib2' ; } use strict; #use warnings ; use File::Basename ; use Algorithm::Permute ; use Spreadsheet::ParseExcel; use Getopt::Long; my($excel_file, $outputdir); &GetOptions("if=s" =>\$excel_file, "od=s" =>\$outputdir, ); my $parser = Spreadsheet::ParseExcel->new(); my $workbook = $parser->Parse($excel_file) || die "Cannot parse the file $!\n" ; for my $worksheet ( $workbook->worksheets() ) { my ( $row_min, $row_max ) = $worksheet->row_range(); my ( $col_min, $col_max ) = $worksheet->col_range(); for my $row ( 1.. $row_max ) { my @required_col = (0,2,13..47); for my $col(@required_col){ my $cell = $worksheet->get_cell($row, $col ); next unless $cell; print ($row, $col),"\n"; print $cell->value(),"\n"; # print "Unformatted = ", $cell->unformatted(), "\n"; print "\n"; } } }