in reply to FindNext function in OLE Excel
It seems that FindNext have to be called upon the search range and provide last cell found by Find (a Range object). Unfortunately the FindNext cycle back to first item found, thus that condition in the while to break that. I had three Johns in my sample spreadsheet, so I got:my $range = $wb->Sheets('Sheet1')->Range("B1:B10"); my $found = $range->Find({ What => 'John' }); my $firstfound = $found; do { warn $found->{Address}," = ",$found->{Value},"\n"; $found = $range->FindNext($found); } while($found && $found->{Address} ne $firstfound->{Address});
Also, there is no need to activate cell to change its properties, you use$B$2 = John $B$4 = John $B$7 = John
-- Hope that helps, Roman$found->Font->{Size} -= 2;
|
|---|