{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "gantt-exporting",
  "framework": "angular",
  "type": "registry:component",
  "component": "Gantt",
  "variant": "exporting",
  "dependencies": [
    "@syncfusion/ej2-angular-gantt"
  ],
  "description": "Gantt chart sample demonstrating export of project data to Excel and PDF formats.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/gantt-exporting.md"
  },
  "files": [
    {
      "target": "src/components/gantt-exporting/exporting.component.ts",
      "content": "import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { editingData, editingResources } from '../data';\nimport { ClickEventArgs } from '@syncfusion/ej2-angular-navigations';\nimport { GanttComponent, PdfExportProperties, GanttModule, PdfExportService, ExcelExportService, ToolbarService, DayMarkersService, SelectionService } from '@syncfusion/ej2-angular-gantt';\nimport { SwitchAllModule } from '@syncfusion/ej2-angular-buttons';\n\n@Component({\n    selector: 'ej2-ganttexporting',\n    templateUrl: 'exporting.html',\n    encapsulation: ViewEncapsulation.None,\n    standalone: true,\n    providers: [PdfExportService, ExcelExportService, ToolbarService, DayMarkersService, SelectionService],\n    imports: [ SwitchAllModule, GanttModule]\n})\nexport class GanttExportingComponent implements OnInit {\n    @ViewChild('ganttExcel')\n    public ganttObj!: GanttComponent;\n    public data!: object[];\n    public resources!: object[];\n    public resourceFields!: object ;\n    public taskSettings!: object;\n    public timelineSettings!: object;\n    public gridLines!: string;\n    public labelSettings!: object;\n    public projectStartDate!: Date;\n    public projectEndDate!: Date;\n    public toolbar!: string[];\n    public splitterSettings!: object;\n    public columns!: object[];\n    public eventMarkers!: object[];\n    public holidays!: object[];\n    public ngOnInit(): void {\n        this.data = editingData;\n        this.taskSettings = {\n            id: 'TaskID',\n            name: 'TaskName',\n            startDate: 'StartDate',\n            duration: 'Duration',\n            progress: 'Progress',\n            dependency: 'Predecessor',\n            parentID: 'ParentID',\n            resourceInfo: 'resources'\n        };\n        this.resourceFields = {\n            id: 'resourceId',\n            name: 'resourceName'\n        };\n        this.toolbar = ['ExcelExport', 'CsvExport', 'PdfExport'];\n        this.timelineSettings = {\n            topTier: {\n                unit: 'Week',\n                format: 'MMM dd, y',\n            },\n            bottomTier: {\n                unit: 'Day',\n                count: 1\n            },\n        };\n        this.gridLines = 'Both';\n        this.labelSettings = {\n            leftLabel: 'TaskName'\n        };\n        this.projectStartDate = new Date('03/26/2025');\n        this.projectEndDate = new Date('09/01/2025');\n        this.resources = editingResources;\n        this.splitterSettings = {\n            position: \"35%\"\n        };\n        this.columns = [\n            { field: 'TaskID', width: 80 },\n            { field: 'TaskName', width: 250 }\n        ];\n    }\n    toolbarClick(args: ClickEventArgs): void {\n        if (args.item.id === 'GanttExport_excelexport') {\n            this.ganttObj.excelExport();\n        }\n        else if (args.item.id === \"GanttExport_csvexport\") {\n            this.ganttObj.csvExport();\n        }\n        else if (args.item.id === \"GanttExport_pdfexport\") {\n          this.ganttObj.pdfExport();\n        }\n    }\n}\n"
    },
    {
      "target": "src/components/gantt-exporting/exporting.html",
      "content": "\n\n<div class=\"control-section\">\n  <ejs-gantt id=\"GanttExport\" #ganttExcel height=\"650px\" rowHeight=\"46\" taskbarHeight=\"25\" [dataSource]=\"data\"\n    [taskFields]=\"taskSettings\" [timelineSettings]=\"timelineSettings\" [labelSettings]=\"labelSettings\"\n    [treeColumnIndex]=\"1\" [allowExcelExport]=\"true\" [allowPdfExport]=\"true\" [allowSelection]=\"true\"\n    dateFormat=\"MMM dd, y\" [projectStartDate]=\"projectStartDate\" [projectEndDate]=\"projectEndDate\"\n    [highlightWeekends]=\"true\" [holidays]=\"holidays\" [gridLines]=\"gridLines\" [toolbar]=\"toolbar\"\n    [resourceFields]=\"resourceFields\" [eventMarkers]=\"eventMarkers\" [resources]=\"resources\"\n    (toolbarClick)=\"toolbarClick($event)\" [splitterSettings]=\"splitterSettings\" [columns]=\"columns\">\n  </ejs-gantt>\n</div>\n"
    }
  ]
}