Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Not closing Excel Application in ASP.NET

Posted on 2002-07-25
5
Medium Priority
?
277 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Zlatin 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:Zlatin 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 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