Hi.
In my application I'm using Excel to get some data into an array from a worksheet.
Here is my method.
public string[,] WorksheetToArray(string path, bool visible = false)
{
oExcel oXL = new oExcel(); // here new icon appears.
if (oXL.Error > 0)
{
MessageBox.Show("An Error Occurred" + "\r" + "Error: " + oXL.Error.ToString(),
"TestApp");
Application.Exit();
}
Excel.Worksheet sheet = oXL.OpenWorkSheet(path);
oXL.oWB.Close(false);
oXL.oXL.Quit(); // expected new icon to disappear
return null;
}
When the line oExcel oXL = new oExcel();
is executed, I get a second system tray icon of my application which does not close after Excel object has quit.
Any ideas how I might solve this?