use OLE; use Win32::OLE::Const "Microsoft Excel"; use strict "vars"; my ($Count, $file, $ML); $Count = Win32::OLE->EnumAllObjects(sub { my $Object = shift; my $Class = Win32::OLE->QueryObjectType($Object); printf "# Object=%s Class=%s\n", $Object, $Class; }); print "count <$Count>\n"; $file = "C:\\abcd.xlsx"; $ML = Win32::OLE->GetObject($file) or print "can't get a handle on '$file'"; print "$ML\n";