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
Add option before execute macro
What do I need to do with my existing win 2003 server DC when adding a Win 2008 SBS in the domain as a GC
Macro to merge columns in Word tables
CAB (inside MSI) files Vs EXE file
Detecting when a file finishes playing in Embedded Windows Media Player
uese cte twice in a query
PHP array problem (filled with db data)
write to app.config file
sharepoint excel services not available in cetral administration
classic asp 3.0 an email