You typically get this sort of exception with incompatible types. Is this
coming from code you wrote or from the OS? In the former, post the code. If
it's the latter, you will need to do some uninstalling and installing to
clear the issue.
--
Regards,
Alvin Bruney - ASP.NET MVP
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @
www.lulu.com/owc
"Samba" wrote in message
...
Hi,
I am trying to access Excel from .NET. Initially it was working fine. But
after sometime it is giving the exception, 'System.InvalidCastException:
QueryInterface for interface Microsoft.Office.Interop.Excel._Application
failed'. I tried reinstalling PIAs and Excel, but nothing worked.
I installed PIA's in the GAC.
I am using Excel 2002 SP-2 and VS 2003.
Thanks for your help.
-Samba