error HRESULT 0x800A03EC while opening excel file

T

tolkien

Hello and happy new year!!!!

I need some help...
I have the following code:
xlApp = new Excel.Application();
xlWorkBook = xlApp.Workbooks.Open(fileName, 0, true, 5, "", "",
true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t",
false, false, 0, true, 1,true);

It works fine on some machines but on others it throws an exception:"
HRESULT 0x800A03EC"

If i change the last argument to false it throws an exception:"{"The
file cannot be opened because your virus scanner has detected a
problem with the file."}"

I tried setting all parameters to System.Reflection.Missing.Value but
nothing..


Any ideas?
Thanks in advance!!!
 
A

Arne Vajhøj

I need some help...
I have the following code:
xlApp = new Excel.Application();
xlWorkBook = xlApp.Workbooks.Open(fileName, 0, true, 5, "", "",
true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t",
false, false, 0, true, 1,true);

It works fine on some machines but on others it throws an exception:"
HRESULT 0x800A03EC"

If i change the last argument to false it throws an exception:"{"The
file cannot be opened because your virus scanner has detected a
problem with the file."}"

I tried setting all parameters to System.Reflection.Missing.Value but
nothing..

The joys of COM .... :-(

I assume that you have tried the obvious: trying to find
a difference in software config (Windows, Excel, .NET etc.)
on the systems where it works and where it does not work.

Furthermore it seems relevant to scan the file for virus
and attempt an repair to see if that changes anything.

What version of Excel was the file created with?

Arne
 
T

tolkien

Arne thank you for your answer,
It seems there was a poblem with my excel file,
i don't know what exactly.
I'll check it again .
If i find the exact cause of the problem i'll post it here just for
the record

Thank you again
 

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