There seems to be nothing wrong with the code you've posted. I've tried it multiple times and it doesn't keep the process running in the background after the app has been closed.
(Possible) Solution
Put your code in a backgroundWorker instance and call the background worker instance asynchronously. This way performing secondary actions won't inhibit the completion of your code.
First add a backgroundWorker instance (Toolbox > Components > background worker) to the form. Secondly add the following code to your form class:
public Form1()
{
InitializeComponent();
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
xlApp = new Excel.Application();
xlWorkBook = xlApp.Workbooks.Open(@"D:/Projects/Training/MemoryExcelInt/MemoryExcelInt/Example.xlsx");
xlWorkSheet = xlWorkBook.Worksheets["Sheet1"];
xlWorkSheet.Cells[9, 5].value = "ExampleValue";
xlWorkBook.PrintOutEx();
xlWorkBook.Close(false, null, null);
xlApp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWorkSheet);
System.Runtime.InteropServices.Marshal.ReleaseComObject(xlWorkBook);
System.Runtime.InteropServices.Marshal.ReleaseComObject(xlApp);
}
private void button1_Click(object sender, EventArgs e)
{
backgroundWorker1.RunWorkerAsync();
}