Problem in launching and saving Excel file via ASP.NET

V

Venkatachalam

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top