Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 200 Automation and IIS7

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel automation Martin Walke[_2_] Excel Programming 6 March 28th 06 02:55 PM
Excel OLE automation Nicolas[_2_] Excel Programming 1 August 19th 05 07:17 PM
Automation : from Excel to VB ? PM Excel Programming 3 October 28th 04 09:19 PM
Excel Com Automation Tom Ogilvy Excel Programming 5 November 10th 03 02:05 PM
Vb.net - excel 97 automation michael Excel Programming 0 August 14th 03 06:16 PM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"