in reply to Re: Win32::OLE & Excel help
in thread Win32::OLE & Excel help

You'll get a little extra benefit if you avoid entering a BLOCK, so:

for my $i (1 .. $LastRow) { next if ($Sheet->Range("E$i")->{Value} =~ /MSD/) ; $CB_COUNT++; next if ($Sheet->Range("J$i")->{Value} =~ /No_/i) ; $NM_COUNT++; }
but as noted elsewhere, the major time cost is probably in the OLE calls.

Is it possible to pull a range into an array ? I'm thinking: @stuff = $Sheet->Range("J1:J$lastrow") ?