Exemplo n.º 1
0
 public static void NewWorkbook(object book)
 {
     Excel.Workbook wb = (Excel.Workbook) book;
     Globals.Workbooks.Add(wb);
     DeactivateBookWatcher deactivateWatcher = new DeactivateBookWatcher(wb);
     wb.Deactivate += new Excel.WorkbookEvents_DeactivateEventHandler(deactivateWatcher.Deactivate);
     foreach(Excel.Worksheet ws in wb.Worksheets) {
         NewWorksheetWatcher.NewWorksheet(book, (object) ws);
     }
 }
Exemplo n.º 2
0
        public static void NewWorkbook(object book)
        {
            Excel.Workbook wb = (Excel.Workbook)book;
            Globals.Workbooks.Add(wb);
            DeactivateBookWatcher deactivateWatcher = new DeactivateBookWatcher(wb);

            wb.Deactivate += new Excel.WorkbookEvents_DeactivateEventHandler(deactivateWatcher.Deactivate);
            foreach (Excel.Worksheet ws in wb.Worksheets)
            {
                NewWorksheetWatcher.NewWorksheet(book, (object)ws);
            }
        }