Multiple gantt exporting in Angular Gantt component
27 Apr 202424 minutes to read
In Gantt, the Excel export provides support to export multiple Gantt data in new sheet or same sheet.
Same sheet
The Excel export provides support to export multiple Gantt data in the same sheet. To export in same sheet, define multipleExport.type
as AppendToSheet
in ExcelExportProperties
. You can also provide blank rows between exported multiple Gantt data. These blank rows count can be defined using multipleExport.blankRows
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { ExcelExport, GanttComponent, ToolbarItem } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<p><b>First Gantt:</b></p>
<ejs-gantt #gantt1 id="ganttDefault1" height="280px" [dataSource]="fData" [taskFields]="fTaskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1" [projectStartDate]="projectStartDate" [projectEndDate]="projectEndDate"></ejs-gantt>
<p><b>Second Gantt:</b></p>
<ejs-gantt #gantt2 id="ganttDefault2" height="250px" [dataSource]="sData" [taskFields]="sTaskSettings" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public fData?: object[];
public sData?: object[];
public fTaskSettings?: object;
public sTaskSettings?: object;
public toolbar?: ToolbarItem[];
public projectStartDate?: Date;
public projectEndDate?: Date;
@ViewChild('gantt1', {static: true}) public fGantt?: GanttComponent;
@ViewChild('gantt2', {static: true}) public sGantt?: GanttComponent;
public ngOnInit(): void {
this.fData = [GanttData[0]];
this.sData = [GanttData[1]];
this.fTaskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.sTaskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport'];
this.projectStartDate = new Date('03/31/2019');
this.projectEndDate = new Date('04/14/2019');
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault1_excelexport') {
const appendExcelExportProperties: ExcelExport| any = {
multipleExport: { type: 'AppendToSheet', blankRows: 2 }
};
const firstGanttExport: Promise<any> = this.fGantt!.excelExport(appendExcelExportProperties, true);
firstGanttExport.then((fData: any) => {
this.sGantt!.excelExport(appendExcelExportProperties, false, fData);
});
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
By default,
multipleExport.blankRows
value is 5.
New sheet
The Excel exporting provides support to export multiple Gantt in new sheet. To export in new sheet, define multipleExport.type
as NewSheet
in ExcelExportProperties
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { ExcelExport, GanttComponent, ToolbarItem } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<p><b>First Gantt:</b></p>
<ejs-gantt #gantt1 id="ganttDefault1" height="280px" [dataSource]="fData" [taskFields]="fTaskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1" [projectStartDate]="projectStartDate" [projectEndDate]="projectEndDate"></ejs-gantt>
<p><b>Second Gantt:</b></p>
<ejs-gantt #gantt2 id="ganttDefault2" height="250px" [dataSource]="sData" [taskFields]="sTaskSettings" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public fData?: object[];
public sData?: object[];
public fTaskSettings?: object;
public sTaskSettings?: object;
public toolbar?: ToolbarItem[];
public projectStartDate?: Date;
public projectEndDate?: Date;
@ViewChild('gantt1', {static: true}) public fGantt?: GanttComponent;
@ViewChild('gantt2', {static: true}) public sGantt?: GanttComponent;
public ngOnInit(): void {
this.fData = [GanttData[0]];
this.sData = [GanttData[1]];
this.fTaskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.sTaskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport'];
this.projectStartDate = new Date('03/31/2019');
this.projectEndDate = new Date('04/14/2019');
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault1_excelexport') {
const appendExcelExportProperties: ExcelExport| any = {
multipleExport: { type: 'NewSheet' }
};
const firstGanttExport: Promise<any> = this.fGantt!.excelExport(appendExcelExportProperties, true);
firstGanttExport.then((fData: any) => {
this.sGantt!.excelExport(appendExcelExportProperties, false, fData);
});
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Customize the Excel export
Gantt Excel export allows the users to customize the exported document based on requirement.
Export hidden columns
In Gantt, the Excel export provides an option to export hidden columns by defining includeHiddenColumn
as true
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { GanttComponent, ToolbarItem ,ExcelExport} from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [columns]="columns" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
public columns?: object[];
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent;
public ngOnInit(): void {
this.data = GanttData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.columns = [
{ field: 'TaskID', headerText: 'Task ID', textAlign: 'Left', width: '100' },
{ field: 'TaskName', headerText: 'Task Name', width: '150' },
{ field: 'StartDate', headerText: 'StartDate', width: '150', visible: false },
{ field: 'Duration', headerText: 'Duration', width: '150' },
{ field: 'Progress', headerText: 'Progress', width: '150' }
];
this.toolbar = ['ExcelExport','CsvExport'];
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
let excelExportProperties: ExcelExport| any = {
includeHiddenColumn: true
};
this.ganttObj!.excelExport(excelExportProperties);
} else if(args.item.id === 'ganttDefault_csvexport') {
let excelExportProperties: ExcelExport| any = {
includeHiddenColumn: true
};
this.ganttObj!.csvExport(excelExportProperties);
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Show or hide columns on exported Excel
In Gantt, while exporting, you can show a hidden column or hide a visible column using the toolbarClick
and excelExportComplete
events.
In the toolbarClick
event, using the args.item.id
property, you can show or hide columns by setting the columns.visible
property to true
or false
respectively.
Similarly, in the excelExportComplete event, you can revert the columns visibility back to the previous state.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { GanttComponent, ToolbarItem } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [columns]="columns" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" (excelExportComplete)='excelExportComplete()' allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
public columns?: object[];
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent| any;
public ngOnInit(): void {
this.data = GanttData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.columns = [
{ field: 'TaskID', headerText: 'Task ID', textAlign: 'Left', width: '100' },
{ field: 'TaskName', headerText: 'Task Name', width: '150' },
{ field: 'StartDate', headerText: 'StartDate', width: '150', visible: false },
{ field: 'Duration', headerText: 'Duration', width: '150' },
{ field: 'Progress', headerText: 'Progress', width: '150' }
];
this.toolbar = ['ExcelExport','CsvExport'];
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
this.ganttObj.treeGrid.grid.columns[0].visible = true;
this.ganttObj.treeGrid.grid.columns[3].visible = false;
this.ganttObj.excelExport();
} else if(args.item.id === 'ganttDefault_csvexport') {
this.ganttObj.treeGrid.grid.columns[0].visible = true;
this.ganttObj.treeGrid.grid.columns[3].visible = false;
this.ganttObj.csvExport();
}
};
public excelExportComplete(): void {
this.ganttObj.treeGrid.grid.columns[0].visible = false;
this.ganttObj.treeGrid.grid.columns[3].visible = true;
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Cell formatting during export
In Gantt, you can customize the TreeGrid cells in the exported document using the excelQueryCellInfo
event. In this event, you can format the TreeGrid cells of exported Excel and CSV documents based on the required condition.
In the following sample, the background color has been customized for TaskID
column in the exported Excel using the args.style
and backColor
properties.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { GanttComponent, ToolbarItem } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { editingData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" (queryCellInfo)='queryCellInfo($event)' (excelQueryCellInfo)='excelQueryCellInfo($event)' (queryTaskbarInfo)='queryTaskbarInfo($event)' allowExcelExport='true' [treeColumnIndex]="1" [columns]="columns" [labelSettings]="labelSettings" [splitterSettings] = "splitterSettings"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
public columns?: object[];
public labelSettings?: object;
public splitterSettings?: object;
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent;
public ngOnInit(): void {
this.data = editingData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport'];
this.columns = [
{ field: 'TaskID', headerText: 'Task ID', textAlign: 'Left', width: '100',visible:false },
{ field: 'TaskName', headerText: 'Task Name', width: '150' },
{ field: 'Progress', headerText: 'Progress', width: '150' },
{ field: 'StartDate', headerText: 'Start Date', width: '150' },
{ field: 'Duration', headerText: 'Duration', width: '150' }
];
this.labelSettings = {
taskLabel: '${Progress}%'
};
this.splitterSettings = {
columnIndex:3
};
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
this.ganttObj!.excelExport();
}
};
public excelQueryCellInfo(args: any): void {
if(args.column.field == 'Progress'){
if(args.value > 80) {
args.style = { backColor: '#A569BD' };
}
else if(args.value < 20) {
args.style = { backColor: '#F08080' };
}
}
}
public queryTaskbarInfo(args: any): void {
if (args.data.Progress > 80) {
args.progressBarBgColor = "#6C3483";
args.taskbarBgColor = args.taskbarBorderColor = "#A569BD";
} else if (args.data.Progress < 20) {
args.progressBarBgColor = "#CD5C5C";
args.taskbarBgColor = args.taskbarBorderColor = "#F08080";
}
}
public queryCellInfo(args: any): void {
if(args.column.field == 'Progress'){
if(args.data.Progress > 80) {
args.cell.style.backgroundColor = '#A569BD';
}
else if(args.data.Progress < 20) {
args.cell.style.backgroundColor = '#F08080';
}
}
}
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Theme
The Excel export also provides an option to include custom theme for exported Excel document.
To apply theme in exported Excel, define the theme
in ExcelExportProperties
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { GanttComponent, ToolbarItem } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent;
public ngOnInit(): void {
this.data = GanttData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport'];
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
let excelExportProperties: any = {
theme:
{
header: { fontName: 'Segoe UI', fontColor: '#666666' },
record: { fontName: 'Segoe UI', fontColor: '#666666' }
}
};
this.ganttObj!.excelExport(excelExportProperties);
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
By default, material theme is applied to the exported Excel document.
Add header and footer
The Excel export also allows users to include header and footer contents to the exported Excel document.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { GanttComponent, ToolbarItem ,ExcelExport} from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent| any;
public ngOnInit(): void {
this.data = GanttData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport'];
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
let excelExportProperties: ExcelExport| any = {
header: {
headerRows: 7,
rows: [
{ cells: [{ colSpan: 4, value: "Northwind Traders", style: { fontColor: '#C67878', fontSize: 20, hAlign: 'Center', bold: true, } }] },
{ cells: [{ colSpan: 4, value: "2501 Aerial Center Parkway", style: { fontColor: '#C67878', fontSize: 15, hAlign: 'Center', bold: true, } }] },
{ cells: [{ colSpan: 4, value: "Suite 200 Morrisville, NC 27560 USA", style: { fontColor: '#C67878', fontSize: 15, hAlign: 'Center', bold: true, } }] },
{ cells: [{ colSpan: 4, value: "Tel +1 888.936.8638 Fax +1 919.573.0306", style: { fontColor: '#C67878', fontSize: 15, hAlign: 'Center', bold: true, } }] },
{ cells: [{ colSpan: 4, hyperlink: { target: 'https://www.northwind.com/', displayText: 'www.northwind.com' }, style: { hAlign: 'Center' } }] },
{ cells: [{ colSpan: 4, hyperlink: { target: 'mailto:support@northwind.com' }, style: { hAlign: 'Center' } }] },
]
},
footer: {
footerRows: 4,
rows: [
{ cells: [{ colSpan: 4, value: "Thank you for your business!", style: { hAlign: 'Center', bold: true } }] },
{ cells: [{ colSpan: 4, value: "!Visit Again!", style: { hAlign: 'Center', bold: true } }] }
]
},
};
this.ganttObj.excelExport(excelExportProperties);
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));
File name for exported document
You can set the required file name for the exported document by defining the fileName
property in ExcelExportProperties
.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { GanttModule } from '@syncfusion/ej2-angular-gantt'
import { ToolbarService, ExcelExportService, SelectionService } from '@syncfusion/ej2-angular-gantt'
import { Component, ViewEncapsulation, OnInit, ViewChild } from '@angular/core';
import { Gantt } from '@syncfusion/ej2-gantt';
import { GanttComponent, ToolbarItem,ExcelExport } from '@syncfusion/ej2-angular-gantt';
import { ClickEventArgs } from '@syncfusion/ej2-navigations';
import { GanttData } from './data';
@Component({
imports: [
GanttModule
],
providers: [ToolbarService, ExcelExportService, SelectionService],
standalone: true,
selector: 'app-root',
template:
`<ejs-gantt #gantt id="ganttDefault" height="430px" [dataSource]="data" [taskFields]="taskSettings" [toolbar]="toolbar"
(toolbarClick)="toolbarClick($event)" allowExcelExport='true' [treeColumnIndex]="1"></ejs-gantt>`,
encapsulation: ViewEncapsulation.None
})
export class AppComponent{
// Data for Gantt
public data?: object[];
public taskSettings?: object;
public toolbar?: ToolbarItem[];
@ViewChild('gantt', {static: true})
public ganttObj?: GanttComponent;
public ngOnInit(): void {
this.data = GanttData;
this.taskSettings = {
id: 'TaskID',
name: 'TaskName',
startDate: 'StartDate',
duration: 'Duration',
progress: 'Progress',
child: 'subtasks'
};
this.toolbar = ['ExcelExport','CsvExport'];
}
public toolbarClick(args: ClickEventArgs): void {
if (args.item.id === 'ganttDefault_excelexport') {
let excelExportProperties: ExcelExport| any = {
fileName:"Gantt.xlsx"
};
this.ganttObj!.excelExport(excelExportProperties);
} else if (args.item.id === 'ganttDefault_csvexport'){
let excelExportProperties: ExcelExport| any = {
fileName:"Gantt.csv"
};
this.ganttObj!.csvExport(excelExportProperties);
}
};
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));