Solved

Not closing Excel Application in ASP.NET

Posted on 2002-07-25
5
271 Views
Last Modified: 2008-02-26
Hello Experts,

I am calling Excel Application in ASP.NET to create excel file and charts. It is working fine but it is not closing the opened instance of the Excel Application.

I am using the following code to Save the file and close the application.

AppExcel.DisplayAlerts = False
AppExcel.ActiveWorkbook.SaveAs(strFile)
AppExcel.ActiveWorkbook.Close()
AppExcel.Quit()
AppExcel = Nothing

Then I have added another two lines of code

Response.Cache.SetExpires(Now)
Response.Cache.SetCacheability(HttpCacheability.NoCache)

Now the application is closing some time but not always.

Please help me to solve this problem.

Many thanks in advance.

Siva
0
Comment
Question by:NellaiSiva
  • 2
5 Comments
 
LVL 8

Expert Comment

by:zlatev
ID: 7233712
Try to disable ASP sessions and ASP caching. This can be done from IIS menagement console, properties on Default Web-Site, Home Directory, Configuration, App Options.

HTH
0
 

Accepted Solution

by:
NellaiSiva earned 0 total points
ID: 7237941
Hi zlatev,

I have tried all the options you have mentioned but it is not closing the Excel Application.

So that, I have solved the problem by creating a DLL in VB and using the same in ASP.NET. Now it is working fine.

Thanks for your comments.

Siva
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 9421039
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/Refund

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheLearnedOne
EE Cleanup Volunteer
0
 
LVL 8

Expert Comment

by:zlatev
ID: 9426865
I agree. It seems to be a configuration problem. However the asker did not succed to solve it by method recommended by me. However s/he has mentioned workaround method that solves the issue.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question