Exemplo n.º 1
0
 public static UtilExcelCom Current()
 {
     if (current == null)
     {
         current = new UtilExcelCom();
     }
     return(current);
 }
Exemplo n.º 2
0
        /// <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
        }
Exemplo n.º 3
0
 public static UtilExcelCom Current()
 {
     if (current == null) current = new UtilExcelCom();
     return current;
 }
Exemplo n.º 4
0
        /// <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
        }