Microsoft
Software
Hardware
Network
Question : Exception from HRESULT: 0x800A03EC Interop Open Excel Workbook
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.InteropServ
ices.COMEx
ception: Exception from HRESULT: 0x800A03EC
Source Error:
Line 630: Object objMissing = System.Reflection.Missing.
Value;
Line 631: object objFileFormat = (object)Microsoft.Office.I
nterop.Exc
el.XlFileF
ormat.xlHt
ml;
Line 632: objBook = objBooks.Open(strFullPathT
oFile,
Line 633: objMissing, //updatelinks
Line 634: false, //readonly
Source File: c:\inetpub\wwwroot\WSWebSe
rvices\App
_Code\Help
ers.cs Line: 632
Stack Trace:
[COMException (0x800a03ec): Exception from HRESULT: 0x800A03EC]
Microsoft.Office.Interop.E
xcel.Workb
ooks.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.Hel
pers.GetEx
celWorkShe
et(String strFullPathToFile, Int32& intHwnd) in c:\inetpub\wwwroot\WSWebSe
rvices\App
_Code\Help
ers.cs:632
ImportIdentityVerification
Data.btnWo
rkWithFile
_Click(Obj
ect sender, EventArgs e) in c:\inetpub\wwwroot\WSWebSe
rvices\Sur
veys\Impor
tIdentityV
erificatio
nData.aspx
.cs:219
System.Web.UI.WebControls.
Button.OnC
lick(Event
Args e) +111
System.Web.UI.WebControls.
Button.Rai
sePostBack
Event(Stri
ng eventArgument) +110
System.Web.UI.WebControls.
Button.Sys
tem.Web.UI
.IPostBack
EventHandl
er.RaisePo
stBackEven
t(String eventArgument) +10
System.Web.UI.Page.RaisePo
stBackEven
t(IPostBac
kEventHand
ler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePo
stBackEven
t(NameValu
eCollectio
n postData) +36
System.Web.UI.Page.Process
RequestMai
n(Boolean includeStagesBeforeAsyncPo
int, Boolean includeStagesAfterAsyncPoi
nt) +1565
Answer : Exception from HRESULT: 0x800A03EC Interop Open Excel Workbook
I solved this problem myself by using ExcelLibrary which seems much less quirky than using Interop
Thanks anyway
Random Solutions
SNMP v3 on Cisco ASA
PHP module for MySql will not load
sql syntax help in my vba code when primary key field has spaces
Excel 2007 VBA Function returns as 'empty'
SBS 2008 Send eMail Settings ??
Exchange 2007 standalone server transport and store services keep stopping
Developing for W2K3 - Missing MSCVP100.DLL & MSVCR100.DLL
How do I change the screen resolution under Solaris 10 ?
Excel: Looping through all chart series of all charts on a worksheet
installing the package