Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I am having an issue with Excel Automation (COM) component inside ASP.NET and IIS7 on Windows Vista. I have been googling and trying things all day, and no I cannot get this to work. I have Office2000 (9) installed (Word and Excel) and am developing a Web application from which I would like to read an Excel file inside the Web request. I have setup impersonation and enabled all of the permissions via (dcomcnfg). This probalem seems to be related IIS7 entirely, but I am not 100% sure. Here is my code: namespace TestWeb { public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Excel.ApplicationClass excel_app = new Excel.ApplicationClass(); ** Exception here ** ==== Excel.Workbook wb = excel_app.Workbooks.Open( "C:\\Test\\New Microsoft Excel Worksheet.xls", Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value); wb.Close(false, Missing.Value, Missing.Value); excel_app.Quit(); } } } This is the exception I receive: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC The thing is I only receive this exception when running under IIS7. If I use the ASP.NET Development server which comes with VS.NET 2005 then this code works fine, it also works fine on Win XP Pro and IIS5.1. I am pretty sure it is not a permissions issue, as when the permissions are incorrect a different exception is thrown on the previous line. I have tried setting the culture info before the cal, but it still fails. Does anyone have an idea what is going on here? Has anyone successfully implmented an Excel Automation call with IIS7 and office 2000? is Office 200 too old? Do we need to upgrade to 2003 or 2007? Thanks for any help, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel automation | Excel Programming | |||
Excel OLE automation | Excel Programming | |||
Automation : from Excel to VB ? | Excel Programming | |||
Excel Com Automation | Excel Programming | |||
Vb.net - excel 97 automation | Excel Programming |