Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Interop Error

Status
Not open for further replies.

kav123

Programmer
Jan 12, 2005
210
GB
I get the following error when i try to access a range in an Excel worksheet:
Exception from HRESULT: 0x800A03EC.

The code at which it throws the error is:

oRange = oSheet.get_Range("NamedRange", Missing.Value).get_Offset(0, 1);

I have searched the internet could not find the solution. Please help!!
 
Have you looked here: ???? Sounds like a permission problem?

Also add this code to to try catch block (if your code is wrapped around a try catch. It may give you more info.)

Catch the exception
try
{
... your failing COM code ....
}catch(Exception e)
{
MessageBox.Show("Exception " + e.Message + " Stack Trace: " + e.printStackTrace());
}

Here's more info. Almost sounds like you have an invalid range name.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top