imrags has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE:my $CB_COUNT = 0; my $NM_COUNT = 0; my $LastRow = $Sheet->UsedRange->Find({What=>"*", SearchDirection=>xlPrevious, SearchOrder=>xlByRows})->{Row}; my $LastCol = $Sheet->UsedRange->Find({What=>"*", SearchDirection=>xlPrevious, SearchOrder=>xlByColumns})->{Column}; print $LastRow." and last column ".$LastCol; for $i (1 .. $LastRow) { my $rango5 = "E".$i; my $rango6 = "J".$i; if ($Sheet->Range("$rango5")->{Value} !~ /MSD/) { $CB_COUNT++; } if ($Sheet->Range("$rango5")->{Value} !~ /MSD/ && $Sheet->Range("$ +rango6")->{Value} !~ /No_/i) { $NM_COUNT++; } }
my $CB_COUNT = 0; my $NM_COUNT = 0; $LastRow = $Sheet->UsedRange->Find({What=>"*", SearchDirection=>xlPrevious, SearchOrder=>xlByRows})->{Row}; my $LastCol = $Sheet->UsedRange->Find({What=>"*", SearchDirection=>xlPrevious, SearchOrder=>xlByColumns})->{Column}; print $LastRow." and last column ".$LastCol; for $i (1 .. $LastRow) { my $rango5 = "E".$i; my $rango6 = "J".$i; # my $rango7 = " if ($Sheet->Range("$rango5")->{Value} !~ /MSD/) { $CB_COUNT++; if($Sheet->Range("$rango6")->{Value} !~ /No_/i) { $NM_COUNT++; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::OLE & Excel help
by prasadbabu (Prior) on Jan 14, 2009 at 09:17 UTC | |
by gone2015 (Deacon) on Jan 14, 2009 at 11:20 UTC | |
|
Re: Win32::OLE & Excel help
by holli (Abbot) on Jan 14, 2009 at 09:21 UTC | |
|
Re: Win32::OLE & Excel help
by Corion (Patriarch) on Jan 14, 2009 at 09:31 UTC | |
by Bloodnok (Vicar) on Jan 14, 2009 at 12:16 UTC | |
|
Re: Win32::OLE & Excel help
by jmcnamara (Monsignor) on Jan 14, 2009 at 11:11 UTC | |
by imrags (Monk) on Jan 15, 2009 at 10:31 UTC |