public ExcelHelper GetExcelFile() { if (_SingleExcelHelper == null) { _SingleExcelHelper = new ExcelHelper(); _SingleExcelHelper.Create(); } return _SingleExcelHelper; }
public ExcelHelper GetExcelFileByPath(string FilePath) { if (_SingleExcelHelper == null) { _SingleExcelHelper = new ExcelHelper(); _SingleExcelHelper.GetCreated(FilePath); _FilePath = FilePath; } return _SingleExcelHelper; }
public void Release() { if (xlWorkBook != null) { xlWorkBook = null; } if (xlApp != null) { xlApp.Quit(); xlApp = null; _SingleExcelHelper = null; GC.Collect(); GC.WaitForPendingFinalizers(); } }