my $LastCol = $sheet->UsedRange->Find({ What => $searchstr, LookAt => 2, LookIn => -4123, MatchCase => "False", SearchDirection => $searchdir, SearchOrder => xlByColumns }); return $LastCol ? $LastCol->{Column} : undef; #### use Win32::OLE::Const 'Microsoft Excel'; my $x = Win32::OLE::Const->Load("Microsoft Excel 9\\.0 Object Library"); for my $key ( sort { $x->{$a} <=> $x->{$b} } keys %$x) { printf "$key = %s\n", $x->{$key}; }