in reply to Re^3: Excel and Perl
in thread Excel and Perl
the above code was given as a solution by wsfp, it doesn';t seemt to run for me and is giving me a long list of errors.use strict; use warnings; use Spreadsheet::ParseExcel; use Spreadsheet::Read; my $ss = ReadData ("4_19_10_Zrc01a-2.xls"); my $s = $ss->[1]; my %max; foreach my $r (1 .. $s->{maxrow}) { my ($A, $B) = ($s->{cell}[5][$r], $s->{cell}[8][$r]); $max{$A} //= $B; $max{$A} < $B and $max{$A} = $B; } print "$_\t$max{$_}\n" for sort { $a <=> $b } keys %max;
The above is the result after I run the program. thank you.Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 14. Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 15. Use of uninitialized value $B in numeric lt (<) at D:\Programming\Perl +\Read.plx line 15. Use of uninitialized value in numeric lt (<) at D:\Programming\Perl\Re +ad.plx lin e 15. Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 14. Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 15. Use of uninitialized value $B in numeric lt (<) at D:\Programming\Perl +\Read.plx line 15. Use of uninitialized value in numeric lt (<) at D:\Programming\Perl\Re +ad.plx lin e 15. Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 14. Use of uninitialized value $A in hash element at D:\Programming\Perl\R +ead.plx li ne 15. Argument " Mapped_Aux_Number" isn't numeric in numeric lt (<) +at D:\Prog ramming\Perl\Read.plx line 15. Argument " Mapped_Aux_Number" isn't numeric in numeric lt (<) +at D:\Prog ramming\Perl\Read.plx line 15. Argument "Volt" isn't numeric in numeric lt (<) at D:\Programming\Perl +\Read.plx line 15. Argument "Volt" isn't numeric in numeric lt (<) at D:\Programming\Perl +\Read.plx line 15. Argument "Comments" isn't numeric in sort at D:\Programming\Perl\Read. +plx line 1 8. Argument "" isn't numeric in sort at D:\Programming\Perl\Read.plx line + 18. Argument "After Conference 3rd test for series.\r\nmass .0037" isn't n +umeric in sort at D:\Programming\Perl\Read.plx line 18. Comments Volt Mapped_Aux_Number After Conference 3rd test for series. mass .0037 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Excel and Perl
by Tux (Canon) on Jun 09, 2011 at 17:47 UTC |