public static UtilExcelCom Current() { if (current == null) { current = new UtilExcelCom(); } return(current); }
/// <summary> /// 释放资源 /// </summary> public static void Release() { #if IS_USE_EXCEL_COM if (current == null) { return; } current.worksheet = null; //if (current.workbook != null) current.workbook.Close(true, Type.Missing, Type.Missing); current.workbook = null; if (current.app != null) { current.app.Quit(); } current.app = null; current = null; #endif }
public static UtilExcelCom Current() { if (current == null) current = new UtilExcelCom(); return current; }
/// <summary> /// 释放资源 /// </summary> public static void Release() { #if IS_USE_EXCEL_COM if (current == null) return; current.worksheet = null; //if (current.workbook != null) current.workbook.Close(true, Type.Missing, Type.Missing); current.workbook = null; if (current.app != null) current.app.Quit(); current.app = null; current = null; #endif }