for (1..$Book->Worksheets->Count) { my $name = $Book->Worksheets($_)->{Name}; if ($name =~ /Position/) {$Sheet = $workbook->Worksheets($_)}; }