C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Killing a particular excel process using procedd id


Posted Date: 30 Aug 2008      Total Responses: 3

Posted By: siddharth       Member Level: Silver     Points: 1



hi,

In my application i have two separate Excel file, which i am using for mapping purpose. Now the prob is that i want to kill only these two excel files leaving the others( opened by other ppl or application) untouched. i know this must be done using process ids, but i don't know how to capture the process id and killing it.

thanks

Sid




Responses

Author: Gaurav Agrawal    30 Aug 2008Member Level: GoldRating:     Points: 0
using file.delete();
GA


Author: veena    31 Aug 2008Member Level: SilverRating:     Points: 4
Dim proc As System.Diagnostics.Process
Dim count As Integer = 0
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")
proc.Kill()
count = count + 1
Next
This code will kill only the excel programs running.



Author: siddharth    31 Aug 2008Member Level: SilverRating:     Points: 2
Hi Veena.. thanks for ur pointers.. but i want to kill only a specific excel process which is initiated by my process... no all the excel process..


Post Reply
You must Sign In to post a response.
Next : How to add node in treeview in VB.NET
Previous : sessions
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

doors in nj

Contact Us    Privacy Policy    Terms Of Use