TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Fahed Al Daye
NA
13
0
I am having problem closing Excel in C#
Jul 29 2010 4:15 PM
I don't know what is wrong but Excel.exe remains in the task list even after I have entered this source code:
ExcelWorkBook.SaveAs(Directory.GetCurrentDirectory() + "\\deleteme.xls", misValue, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlNoChange, misValue, misValue, misValue, misValue);
ExcelWorkBook.Close(null, null, null);
ExcelApplication.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkBooks);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelWorkBook);
System.Runtime.InteropServices.Marshal.ReleaseComObject(ExcelApplication);
GC.Collect();
GC.WaitForPendingFinalizers();
I cannot seem to close Excel in C#. Any help would be greatly appreciate it! Thanks in advance.
Reply
Answers (
7
)
GetElementById() not working
Error when run project