Problem in launching and saving Excel file via ASP.NET
From: Venkatachalam (Venkatachalam_at_discussions.microsoft.com)
Date: 12/21/04
- Next message: Joe: "Security question for a Winforms user control on a web page"
- Previous message: Neil: "Cross Site Scripting & Custom Error Pages"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 21 Dec 2004 10:13:08 -0800
Hello,
In my web application, I want to create an Excel application, Based on
some condition. When my ASP application creats the Excel applicatrion, the
Excel application loads in the memorey (By viewing the task List Process).
But when I try to do some operation on the Excel, it throws exception which I
have copied in the later portion.
Before going to the Exception details, I like to give more info on my
tries...
* I gave full permission to ASPNET user account
* I gave Launching permission for Excel to ASPNET user account in the
DCOM-CONFIG also
these two also did not help me. Any help is appricated.
/*--------Begining of Error Message------------*/
Exception from HRESULT: 0x800A03EC.
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.InteropServices.COMException: Exception
from HRESULT: 0x800A03EC.
Line 54: oExcel.Workbooks.Application.SaveWorkspace("C:\\SampleExcel.Xls");
/*--------End of Error Message------------*/
/*--------Begning of Code------------*/
private void Button1_Click(object sender, System.EventArgs e)
{
Excel.ApplicationClass oExcel = new Excel.ApplicationClass();
oExcel.Visible = true;
// Lot more code need to be added
oExcel.Workbooks.Application.SaveWorkspace("C:\\SampleExcel.Xls");
}
/*--------End of Code------------*/
Thanks
With regards
Venkat
- Next message: Joe: "Security question for a Winforms user control on a web page"
- Previous message: Neil: "Cross Site Scripting & Custom Error Pages"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]