private void OnWorkbookOpen(Workbook workbook)
        {
            var workbookMap = this.workBookMaps.Find(item => item.Workbook == workbook);

            // This is for new condition else it is a reopen scenario
            if (workbookMap == null)
            {
                this.currentWorkbookMap = workbook.GetWorkbookMap();

                // Add this to the workbook map list
                this.workBookMaps.Add(this.currentWorkbookMap);
            }

            var viewpointMap = this.viewpointMaps.Find(item => item.Workbook == workbook);

            // This is for new condition else it is a reopen scenario
            if (viewpointMap == null)
            {
                this.currentViewpointMap = workbook.GetViewpointMap();

                // Add this to the viewpoint map list
                this.viewpointMaps.Add(this.currentViewpointMap);
            }

            if (this.ribbonInstance != null && this.currentWorkbookMap.LocalLayerMaps.Count > 0)
            {
                this.ribbonInstance.ViewCustomTaskPane(true);
            }

            // Sync up in case some workbook in excel was overwritten by open
            SyncWorkbookMapWithExcel();
            SyncViewpointMapWithExcel();
        }
        private void OnNewWorkbook(Workbook workbook)
        {
            // Create a new workbookMap and add it to the list
            this.currentWorkbookMap = workbook.GetWorkbookMap();

            this.currentViewpointMap = workbook.GetViewpointMap();

            // Add this to the workbook map list
            this.workBookMaps.Add(this.currentWorkbookMap);

            this.viewpointMaps.Add(this.currentViewpointMap);
        }