V
v.mazzotta
I need to kill EXCEL.EXE generated by OWC11 to delete files saved fo
export on spreadsheet and chart, owns by ASPNET.
I test this solution in same C# page where i generate xls and gif file
but don't go :
System.Runtime.InteropServices.Marshal.ReleaseComObject(Range);
System.Runtime.InteropServices.Marshal.ReleaseComObject(sheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oSpreadsheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(objChart);
System.Runtime.InteropServices.Marshal.ReleaseComObject(objCSpace);
objChart = null;
objCSpace = null;
Range = null;
sheet = null;
oSpreadsheet = null;
GC.Collect();
System.Diagnostics.Process[] myProcesses;
myProcesses = System.Diagnostics.Process.GetProcessesByName("EXCEL");
foreach (System.Diagnostics.Process instance in myProcesses)
{
instance.CloseMainWindow();
}
If I manually kill by task manager EXCEL.EXE process I can delete xl
and gif files
export on spreadsheet and chart, owns by ASPNET.
I test this solution in same C# page where i generate xls and gif file
but don't go :
System.Runtime.InteropServices.Marshal.ReleaseComObject(Range);
System.Runtime.InteropServices.Marshal.ReleaseComObject(sheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(oSpreadsheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(objChart);
System.Runtime.InteropServices.Marshal.ReleaseComObject(objCSpace);
objChart = null;
objCSpace = null;
Range = null;
sheet = null;
oSpreadsheet = null;
GC.Collect();
System.Diagnostics.Process[] myProcesses;
myProcesses = System.Diagnostics.Process.GetProcessesByName("EXCEL");
foreach (System.Diagnostics.Process instance in myProcesses)
{
instance.CloseMainWindow();
}
If I manually kill by task manager EXCEL.EXE process I can delete xl
and gif files