Excel Automation Problem

M

miztaken

Hi there,

I am having problem with excel automation.

I have been developing an application in C#.NET which needs to extract
embedded office documents (DOC,XLS,PPT) from office documents
(DOC,XLS,PPT)

For this i have been using the COM Interop Assembly exposed by .NET
for Microsoft Office.

But i am having problem when i deal with Excel File. I have been
getting this error:

1. Error: Exception from HRESULT: 0x800A03EC

This error is highly unpredictable.

I have googled a lot and someone has suggested to use Sleep(1000) of
kernel32.dll but this is not solving my problem.
I have been rambling around internet for days now?

Also: This error doesn't appear when i run the application by
debugging step by step.

Note: My application also deals with outlook files at the same time.
Does this interrupt Excel Automation? I have read somewhere it does?

Please let me know your thoughts on these.

Help me
miztaken
 
C

CKA

Hello all,


I am getting the same error when I try to access an Excel worksheet. I am
running this on Vista x64 (not sure if that matters).


Below is the line of code that throws the exception

xlSheet = (Excel.Worksheet)Application.ThisWorkbook.Worksheets["Sheet1"];


I am trying to follow the following article:
http://msdn.microsoft.com/en-us/library/aa192473.aspx


Someone please help!

Thanks,
CKA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top