Ignite UI for Angular Excel Exporter Service - Documentation
The Ignite UI for Angular Excel Exporter service can export data in Microsoft® Excel® format from both raw data
(array) or from an IgxGrid.
Example:
public localData = [
{ Name: "Eric Ridley", Age: "26" },
{ Name: "Alanis Brook", Age: "22" },
{ Name: "Jonathan Morris", Age: "23" }
];
constructor(private excelExportService: IgxExcelExporterService) {
}
this.excelExportService.exportData(this.localData, new IgxExcelExporterOptions("FileName")); Constructors
Section titled "Constructors"IgxExcelExporterService
new IgxExcelExporterService(): IgxExcelExporterService Returns IgxExcelExporterService
Properties
Section titled "Properties"columnExporting
Section titled "columnExporting"Inherited from: IgxBaseExporter
This event is emitted when a column is exported.
this.exporterService.columnExporting.subscribe((args: IColumnExportingEventArgs) => {
// put event handler code here
}); columnExporting: EventEmitter<IColumnExportingEventArgs> Defined in projects/igniteui-angular/grids/core/src/services/exporter-common/base-export-service.ts:200
exportEnded
Section titled "exportEnded"This event is emitted when the export process finishes.
this.exporterService.exportEnded.subscribe((args: IExcelExportEndedEventArgs) => {
// put event handler code here
}); exportEnded: EventEmitter<IExcelExportEndedEventArgs> Defined in projects/igniteui-angular/grids/core/src/services/excel/excel-exporter.ts:59
rowExporting
Section titled "rowExporting"Inherited from: IgxBaseExporter
This event is emitted when a row is exported.
this.exporterService.rowExporting.subscribe((args: IRowExportingEventArgs) => {
// put event handler code here
}); rowExporting: EventEmitter<IRowExportingEventArgs> Defined in projects/igniteui-angular/grids/core/src/services/exporter-common/base-export-service.ts:188
Methods
Section titled "Methods"export
Section titled "export"Inherited from: IgxBaseExporter
Method for exporting IgxGrid component's data.
this.exporterService.export(this.igxGridForExport, this.exportOptions);export(grid: GridTypeBase, options: IgxExporterOptionsBase): void Defined in projects/igniteui-angular/grids/core/src/services/exporter-common/base-export-service.ts:227
Parameters
- grid:
GridTypeBase - options:
IgxExporterOptionsBase
Returns void
exportData
Section titled "exportData"Inherited from: IgxBaseExporter
Method for exporting any kind of array data.
this.exporterService.exportData(this.arrayForExport, this.exportOptions);exportData(data: any[], options: IgxExporterOptionsBase): void Defined in projects/igniteui-angular/grids/core/src/services/exporter-common/base-export-service.ts:286
Parameters
- data:
any[] - options:
IgxExporterOptionsBase