cancel
Showing results for 
Search instead for 
Did you mean: 

How to close Excel CSV format files

Murali_MohanKon
Level 4
Hi, How to close Excel CSV format files if anyone have idea please share it. From application it is opening with csv format file but i need to close every time, i have tried using close all instances from MSExcel vbo but did not work. Thanks in advance.   Thanks Murali Mohan
3 REPLIES 3

AmiBarrett
Level 12
I wound up making an Extended Environment object to handle this for other uses. Set it to C# and add System.Diagnostics.  Use the below in a code stage, where ""proc"" should be the process name you're trying to kill. foreach(Process p in Process.GetProcesses()) {     if (p.ProcessName.ToLower().Equals(proc.ToLower()))         p.Kill(); }

Murali_MohanKon
Level 4
Thank you amibarrett for quick response.

AndreyKudinov
Level 10
To close some instance, you need to have it open first.  If I got it right, you need to close excel that was opened by the app - then you need to attach to it first (by workbook name if there are more than once instance running), then close instance will work.