Hi Division,
Thanks for using Syncfusion Product.
For your Kind information, currently there is no support to export the Gantt chart to excel or pdf. Also we have already logged a feature report on “Support for exporting Gantt chart” regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you need more information on this.
Regards,
Mahalakshmi K.
Hi Division,
Thanks for using Syncfusion Product.
Currently there is no support to export the Schedule data to excel. Also we have already logged a feature report on “Need to provide support for exporting schedule appointments data into xls file” regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let me know if you have any questions.
Regards,
Velmurugan
[controller]
using Syncfusion.EJ.Export;
using Syncfusion.XlsIO;
using Syncfusion.JavaScript.Models;
public void ExportToExcel(string GanttModel)
{
ExcelExport exp = new ExcelExport();
var DataSource = this.GetEditingDataSource();
GanttProperties obj = ConvertGanttObject(GanttModel);
exp.Export(obj, DataSource, "GanttExport.xlsx", ExcelVersion.Excel2010, new GanttExportSettings() { Theme = ExportTheme.FlatSaffron });
}
private GanttProperties ConvertGanttObject(string gridProperty)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
IEnumerable div = (IEnumerable)serializer.Deserialize(gridProperty, typeof(IEnumerable));
GanttProperties gridProp = new GanttProperties();
foreach (KeyValuePair<string, object> ds in div)
{
var property = gridProp.GetType().GetProperty(ds.Key, BindingFlags.Instance | BindingFlags.Public | BindingFlags.IgnoreCase);
if (property != null)
{
Type type = property.PropertyType;
string serialize = serializer.Serialize(ds.Value);
object value = serializer.Deserialize(serialize, type);
property.SetValue(gridProp, value, null);
}
}
return gridProp;
} |
[view]
@(Html.EJ().Gantt("GanttContainer")
.Mappers(mp => mp.ExportToExcelAction("Gantt/ExportToExcel"))
.ToolbarSettings(tool =>
{
tool.ShowToolbar(true);
tool.ToolbarItems(new List<GanttToolBarItems>()
{
GanttToolBarItems.ExcelExport,
});
})
.Datasource(ViewBag.datasource)
)@(Html.EJ().ScriptManager()) |