$xl = new-object -comobject Excel.Application $source_wb = $xl.workbooks.open($source) $xl.visible=$false $type=$xl.GetType() $ret=$type.InvokeMember("Run",[Reflection.BindingFlags]::InvokeMethod,$null,$xl,$param) Write-Host $ret $xl.Quit() $currentThread.CurrentCulture = $oldci [System.Runtime.Interopservices.Marshal]::ReleaseComObject($xl) Remove-Variable xl