public Form1() { InitializeComponent(); excelEngine = new ExcelEngine(); importingHelper = new ImportingHelper(); FileStream fileStream = new FileStream(@"..\..\Data\Sample.xlsx", FileMode.Open); if (fileStream != null) { workbook = excelEngine.Excel.Workbooks.Open(fileStream, ExcelOpenType.Automatic); importingHelper.LoadWorkbook(this.tabBarSplitterControl1, workbook); gridModelCollection = importingHelper.gridModelCollection; } //Used to focus formula cell when it is edit mode GridFormulaCellRenderer.ForceEditWhenActivated = false; }
public Form1() { InitializeComponent(); if (DpiAware.GetCurrentDpi() > 96) { this.CaptionBarHeight = (int)DpiAware.LogicalToDeviceUnits(this.CaptionBarHeight); } excelEngine = new ExcelEngine(); importingHelper = new ImportingHelper(); #if !NETCORE FileStream fileStream = new FileStream(@"..\..\Data\Sample.xlsx", FileMode.Open); #else FileStream fileStream = new FileStream(@"..\..\..\Data\Sample.xlsx", FileMode.Open); #endif if (fileStream != null) { workbook = excelEngine.Excel.Workbooks.Open(fileStream, ExcelOpenType.Automatic); importingHelper.LoadWorkbook(this.tabBarSplitterControl1, workbook); gridModelCollection = importingHelper.gridModelCollection; } //Used to focus formula cell when it is edit mode GridFormulaCellRenderer.ForceEditWhenActivated = false; }