Esempio n. 1
0
 public static void OpenExcelDoc(string fileName, ref ExcelAppVar apVar, ref MSExcel._Workbook wb)
 {
     wb = apVar.App.Workbooks.Open(fileName);
     //获取Excel App的句柄
     int pid = -1;
     //通过Windows API获取Excel进程ID
     DataUtility.DataUtility.GetWindowThreadProcessId(new IntPtr(apVar.App.Hwnd), out pid);
     apVar.docDic.Add(pid, wb);
     docAppDic.Add(pid, apVar.App);
 }
Esempio n. 2
0
        public static void OpenExcelDoc(string fileName, ref ExcelAppVar apVar, ref MSExcel._Workbook wb)
        {
            wb = apVar.App.Workbooks.Open(fileName);
            //获取Excel App的句柄
            int pid = -1;

            //通过Windows API获取Excel进程ID
            DataUtility.DataUtility.GetWindowThreadProcessId(new IntPtr(apVar.App.Hwnd), out pid);
            apVar.docDic.Add(pid, wb);
            docAppDic.Add(pid, apVar.App);
        }
Esempio n. 3
0
 public static void OpenExcelApp(ref ExcelAppVar ap)
 {
     ap.App = new MSExcel.Application();
     appList.Add(ap);
 }
Esempio n. 4
0
 public static void OpenExcelApp(ref ExcelAppVar ap)
 {
     ap.App = new MSExcel.Application();
     appList.Add(ap);
 }