Example #1
0
        public static void Quit()
        {
            if (XlApp.Workbooks.Count > 0)
            {
                XlApp.Workbooks.Close();
            }

            if (XlApp != null)
            {
                XlApp.Quit();
            }
        }
Example #2
0
 /// <summary>
 /// Closes the excel spreadsheet
 /// </summary>
 public void ExcelCloseSpreadSheet()
 {
     WorkBook.Close();
     XlApp.Quit();
 }