private void LoadWorkbookView() { //workbook = SpreadsheetGear.Factory.GetWorkbook(this.tmpXlsName); workbook = SpreadsheetGear.Factory.GetWorkbook(); worksheet = workbook.ActiveWorksheet; wbView = new SpreadsheetGear.Windows.Forms.WorkbookView(workbook); wbView.GetLock(); try { SpreadsheetGear.IWorkbookWindowInfo windowInfo = wbView.ActiveWorkbookWindowInfo; windowInfo.DisplayWorkbookTabs = false; worksheet.WindowInfo.Zoom = 100; wbView.Parent = this;; wbView.BringToFront(); wbView.Dock = DockStyle.Fill; wbView.CellBeginEdit += new CellBeginEditEventHandler(wbView_CellBeginEdit); wbView.RangeChanged += new RangeChangedEventHandler(wbView_RangeChanged); wbView.RangeSelectionChanged += wbView_RangeSelectionChanged; } finally { wbView.ReleaseLock(); } }
private void LoadWorkbookView() { //workbook = SpreadsheetGear.Factory.GetWorkbook(this.tmpXlsName); // workbook = SpreadsheetGear.Factory.GetWorkbook(); worksheet = workbook.ActiveWorksheet; wbView = new SpreadsheetGear.Windows.Forms.WorkbookView(workbook); wbView.GetLock(); try { //SpreadsheetGear.IWorkbookWindowInfo windowInfo = wbView.ActiveWorkbookWindowInfo; //windowInfo.DisplayWorkbookTabs = false; worksheet.WindowInfo.Zoom = 100; wbView.Parent = this;; wbView.BringToFront(); wbView.Dock = DockStyle.Fill; } finally { wbView.ReleaseLock(); } }