var options = new ExcelExportingOptions();
ExcelEngine excelEngine = new ExcelEngine();
IWorkbook workBook = excelEngine.Excel.Workbooks.Create();
workBook.Worksheets.Create();
options.ExportMode = ExportMode.Text;
this.dataGrid.ExportToExcel(dataGrid.View, options, workBook.Worksheets[0]);
workBook.Worksheets[0].Range.RowHeight = 70;
workBook.Worksheets[0].Range.ColumnWidth = 100; |
workBook.Worksheets[0].SetColumnWidth(1, 30);
workBook.Worksheets[0].SetRowHeight(1, 30); |