Gantt Exporting services

14 Dec 20175 minutes to read

Description

Find the Gantt exporting type below.

  • Excel Export.

Excel export

URL

http://js.syncfusion.com/ejServices/api/JSGanttExport/ExcelExport

Parameter

Type1:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be passed to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.

Type2:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
excelName String It specifies the file name an extension to be downloaded.
excelVersion String Excel version in which workbook should download.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.

Type3:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
excelName String It specifies the file name and extension to be downloaded.
excelVersion String Excel version in which workbook should download.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
filePath String With this parameter you can set the location where the exporting file should downloaded. It can be local or server machine file path.

Type4:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be passed to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append it to something else before download starts.
headerText String headerText is to specify the title for export workbook.

Type5:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting
datasource object It holds the data to be exported in Excel
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
excelName String With this parameter you can set the downloaded file name. By default it is set to “Export”
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
headerText String headerText is to specify the title for export workbook.

Type6:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
excelName String With this parameter you can set the downloaded file name. By default it is set to “Export”.
filePath String With this parameter you can set the location where the exporting file should downloaded. It can be local or server machine file path.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
headerText String headerText is to specify the title for export workbook.

Type7:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
Workbook Object It specifies in case of multiple exporting, in that workbook the file export should append, it holds the internally stored excel files which is exported previously.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
headerText String headerText is to specify the title for export workbook.

Type8:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
excelName string With this parameter you can set the downloaded file name. By default it is set to “Export”.
Workbook Object It specifies in case of multiple exporting, in that workbook the file export should append, it holds the internally stored excel files which is exported previously.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
headerText String headerText is to specify the title for export workbook.

Type9:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be pass to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
excelName string With this parameter you can set the downloaded file name. By default it is set to “Export”.
filePath String With this parameter you can set the location where the exporting file should downloaded. It can be local or server machine file path.
Workbook Object It specifies in case of multiple exporting, in which workbook the file export should append, it holds the internally stored excel files which is exported previously.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
headerText String headerText is to specify the title for export workbook.

Type10:

Name Type Description
GanttProperties Object It takes Gantt model properties that should be passed to exporting.
datasource object It holds the data to be exported in Excel.
GanttExportSettings object Returns the exporting settings like unicode support, columns fit to width, hidden column.
excelName string With this parameter you can set the downloaded file name. By default it is set to “Export”.
multipleExport Boolean Is a boolean argument, and value `false` specifies the exporting is completed and download it, value `true` specifies the export Gantt internally and append something else to it before download starts.
Workbook Object It specifies in case of multiple exporting, in that workbook the file export should append, it holds the internally stored excel files which is exported previously.
MultipleExportType Object It specifies in case of multiple export, it returns the exporting type whether the file should append to the sheet or it should export in new sheet.
headerText String headerText is to specify the title for export workbook.

Request

  • JAVASCRIPT
  • <div id="Gantt"></div>
    
    <script>
    
    $("#Gantt").ejGantt({
    
        toolbarClick: function(args) {
    
            this.exportGrid = this["export"];
    
            if (args.itemName == "Excel Export") {
    
                this.exportGrid('http://js.syncfusion.com/ejServices/api/JSGanttExport/ExcelExport', "", false);
    
                args.cancel = true;
    
            }
    
        }
    
    });
    
    </script>

    Following example will take part in the project service

    public void ExcelExport()
    
    {
    
    string gridModel = HttpContext.Current.Request.Params["GanttModel"];
    
    GanttProperties gridProperty = ConvertGridObject(gridModel);
    
    ExcelExport exp = new ExcelExport();
    
    TaskDetailsCollection task = new TaskDetailsCollection();
    
    IEnumerable<TaskDetails> result = task.GetDataSource();
    
    exp.Export(gridProperty, result, "ExcelExport.xlsx", ExcelVersion.Excel2010, new GanttExportSettings() { Theme = ExportTheme.FlatAzure });
    
    }