How to close Excel from ASP.NET

Using COM objects in ASP.NET is a hell, while it comes to releasing memory. After; creating excel object and using it, just saying exlobj=nothing wont help. Instead we need to use

System.Runtime.InteropServices.Marshal.ReleaseComObject(wsheet);

For explicitly releasing the object.

 

 

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish