I'm using excel to populate some data and create a report using the following code:
Excel.Application app = new Excel.Application();
Excel.Workbook workbook = app.Workbooks.Open(templatePath);
Excel.Worksheet worksheet = workbook.Worksheets[1];
worksheet.Cells[1, 2] = myInbox.FolderPath;
worksheet.Cells[2, 2] = DateTime.Today.ToShortDateString();
worksheet.Cells[2, 4] = DateTime.Now.ToShortTimeString();
app.Visible = true;
workbook.RefreshAll();
This all seems to work fine, however when I look at task manager I notice several instances of excel open in "background processes". There appears to be one instance of excel for every time I have run the code despite closing excel each time.
These background processes don't even appear if I open Excel manually.