-1
I have this c# function that converts an excel file into another excel format, the problem is that when the application runs it does not end with the _app quit function.();
The excel application is started in this code snippet: var _app = new Excel.Application();
It starts three processes:
I don’t have Excel installed on my machine, I use WPS Oficce 2019, an alternative, free software.
How do I close this application?
private void Convert_CSV_To_Excel()
{
try
{
// Rename .csv To .xlsm
System.IO.File.Move(File, File);
var _app = new Excel.Application();
var _workbooks = _app.Workbooks;
_workbooks.OpenText(File,
DataType: Excel.XlTextParsingType.xlDelimited,
TextQualifier: Excel.XlTextQualifier.xlTextQualifierNone,
ConsecutiveDelimiter: true,
Semicolon: true);
// Convert To Excle 97 / 2003
_workbooks[1].SaveAs(File + "OK.xlsm", Excel.XlFileFormat.xlOpenXMLWorkbookMacroEnabled);
_workbooks.Close();
_app.Quit();
}
That can help you.
– CypherPotato