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
DB2 Equivalent of CINT & REPLACE
can't fix this syntax error
On Cisco Hybrid 6509 with CATOS/IOS, how do you browse the const_nvram: to check vlan.dat file?
Graying out the background
Cepstral on CentOS 5.5 no sound
Teaming NICs
Using rand() to generate data
Microsoft Acess 2007: Primary Key
can't access sbs2003 network resources
Group Policy: GPO remove item set for installation