my $xl = Win32::OLE::Const->Load("Microsoft Excel"); printf "Excel type library contains %d constants:\n", scalar keys %$xl; foreach my $Key (sort keys %$xl) { if ($Key eq "xlCalculationManual" || $Key eq "xlCalculationAutomatic" ){ print "$Key = $xl->{$Key}\n"; } }