Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Exception from HRESULT: 0x800A03EC Interop Open Excel Workbook

Avatar of WSIT
WSIT asked on
C#Microsoft Excel
6 Comments1 Solution7773 ViewsLast Modified:
I have a c# prject which when running locally can happily open and save excel workbooks using automation.  When I put the project on a web server I get Exception from HRESULT: 0x800A03EC if I trry to open a workbook or save one.  I am able to obtain a list of the files in the folder in which the workbook is located.

Any help would be greatly appreciated.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC

Source Error:

Line 630:            Object objMissing = System.Reflection.Missing.Value;
Line 631:            object objFileFormat = (object)Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml;
Line 632:            objBook = objBooks.Open(strFullPathToFile,
Line 633:                objMissing, //updatelinks
Line 634:                false, //readonly

Source File: c:\inetpub\wwwroot\WSWebServices\App_Code\Helpers.cs    Line: 632

Stack Trace:

[COMException (0x800a03ec): Exception from HRESULT: 0x800A03EC]
   Microsoft.Office.Interop.Excel.Workbooks.Open(String Filename, Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad) +0
   WSWebServices.App_Code.Helpers.GetExcelWorkSheet(String strFullPathToFile, Int32& intHwnd) in c:\inetpub\wwwroot\WSWebServices\App_Code\Helpers.cs:632
   ImportIdentityVerificationData.btnWorkWithFile_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\WSWebServices\Surveys\ImportIdentityVerificationData.aspx.cs:219
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


Avatar of WSIT

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers