protected void GanttControlExporting_ServerExcelExporting(object sender, Syncfusion.JavaScript.Web.GanttEventArgs e) { ExcelExport exp = new ExcelExport(); GanttExportSettings settings = new GanttExportSettings(); settings.Theme = ExportTheme.FlatLime; exp.Export(this.GanttControlExporting.Model, (IEnumerable)this.GanttControlExporting.DataSource, "Export.xlsx", ExcelVersion.Excel2010, new GanttExportSettings() { Theme = ExportTheme.FlatLime }); }
public ActionResult ExportToExcel(string GanttModel) { ExcelExport exp = new ExcelExport(); var DataSource = GetExportEditingTaskData(); GanttProperties ganttProp = ConvertGridObject(GanttModel); GanttExcelExport excelExp = new GanttExcelExport(); excelExp.FileName = "Export.xlsx"; GanttExportSettings settings = new GanttExportSettings() { Theme = ExportTheme.FlatSaffron }; excelExp.ExcelVersion = ExcelVersion.Excel2010; return(exp.Export(ganttProp, DataSource, settings)); }