UNPKG

@progress/kendo-angular-excel-export

Version:

Kendo UI for Angular Excel Export component

804 lines (787 loc) 31.9 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import * as i0 from '@angular/core'; import { Component, Input, ContentChildren, QueryList, Directive, Optional, forwardRef, SkipSelf, Host, ContentChild, NgModule } from '@angular/core'; import { saveAs } from '@progress/kendo-file-saver'; import { IntlService, ExcelExporter, Workbook } from '@progress/kendo-ooxml'; export * from '@progress/kendo-ooxml'; import { toString } from '@progress/kendo-intl'; import * as i1 from '@progress/kendo-angular-l10n'; import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n'; import { validatePackage } from '@progress/kendo-licensing'; const compileTemplate = (templateRef, context, updateContext) => { let embeddedView = templateRef.createEmbeddedView(context); const result = (data) => { updateContext(context, data); embeddedView.detectChanges(); return embeddedView.rootNodes.reduce((content, rootNode) => { return content + rootNode.textContent; }, '').trim(); }; result.destroy = () => { embeddedView.destroy(); embeddedView = null; }; return result; }; const updateGroupHeaderContext = (context, data) => { context.$implicit = context.group = data; context.field = data.field; context.value = data.value; context.aggregates = data.aggregates; }; const updateGroupFooterContext = (context, data) => { context.group = data.group; context.$implicit = context.aggregates = data; }; const updateFooterContext = (context, data) => { context.aggregates = data.aggregates; }; /** * @hidden */ const toExporterColumns = (sourceColumns) => { const exporterColumns = []; let columnIndex = 0; const addColumns = (columns, result, level) => { columns.forEach((column) => { if (column.level === level) { const exporterColumn = new ExporterColumn(column, columnIndex); result.push(exporterColumn); if (column.children && column.children.some(c => c !== column)) { const children = exporterColumn.columns = []; addColumns(column.children, children, level + 1); } else { columnIndex++; } } }); }; addColumns(sourceColumns, exporterColumns, 0); return exporterColumns; }; /** * @hidden */ const destroyColumns = (columns) => { if (columns) { columns.forEach(column => { column.destroy(); }); } }; /** * @hidden */ class ExporterColumn { title; field; hidden; locked; width; columns; groupHeaderTemplate; groupHeaderColumnTemplate; groupFooterTemplate; footerTemplate; headerCellOptions; cellOptions; groupHeaderCellOptions; groupFooterCellOptions; footerCellOptions; constructor(column, columnIndex) { this.title = column.title; this.field = column.field; this.hidden = column.hidden; this.locked = column.locked; this.width = column.width; this.headerCellOptions = column.headerCellOptions; this.cellOptions = column.cellOptions; this.groupHeaderCellOptions = column.groupHeaderCellOptions; this.groupFooterCellOptions = column.groupFooterCellOptions; this.footerCellOptions = column.footerCellOptions; if (column.footerTemplate) { this.footerTemplate = compileTemplate(column.footerTemplate.templateRef, { $implicit: column, column: column, columnIndex: columnIndex }, updateFooterContext); } if (column.groupFooterTemplate) { this.groupFooterTemplate = compileTemplate(column.groupFooterTemplate.templateRef, { column: column, field: column.field }, updateGroupFooterContext); } if (column.groupHeaderTemplate) { this.groupHeaderTemplate = compileTemplate(column.groupHeaderTemplate.templateRef, {}, updateGroupHeaderContext); } if (column.groupHeaderColumnTemplate) { this.groupHeaderColumnTemplate = compileTemplate(column.groupHeaderColumnTemplate.templateRef, {}, updateGroupHeaderContext); } } destroy() { if (this.footerTemplate) { this.footerTemplate.destroy(); } if (this.groupFooterTemplate) { this.groupFooterTemplate.destroy(); } if (this.groupHeaderTemplate) { this.groupHeaderTemplate.destroy(); } if (this.groupHeaderColumnTemplate) { this.groupHeaderColumnTemplate.destroy(); } destroyColumns(this.columns); } } IntlService.register({ toString }); /** * * @hidden */ const workbookOptions = (options) => { const columns = toExporterColumns(options.columns); const exporter = new ExcelExporter({ columns: columns, data: options.data, filterable: options.filterable, groups: options.group, paddingCellOptions: options.paddingCellOptions, headerPaddingCellOptions: options.headerPaddingCellOptions, collapsible: options.collapsible, hierarchy: options.hierarchy, aggregates: options.aggregates }); const result = exporter.workbook(); result.creator = options.creator; result.date = options.date; result.rtl = options.rtl; destroyColumns(columns); return result; }; /** * @hidden */ const toDataURL = (options) => { const workbook = new Workbook(options); return workbook.toDataURL(); }; /** * @hidden */ const isWorkbookOptions = (value) => { return value && value.sheets; }; /** * @hidden */ class ColumnBase { parent; /** * The title of the column. */ title; /** * The width of the column in pixels. */ width; /** * Toggles the locked (frozen) state of the column ([see example]({% slug columns_excel-export %}#toc-locked-state)). * * @default false */ locked; /** * Sets the visibility of the column ([see example]({% slug columns_excel-export %}#toc-hidden-state)). * * @default false */ hidden; /** * The options of the column header cell. */ headerCellOptions; /** * @hidden */ children; /** * @hidden */ get level() { return this.parent ? this.parent.level + 1 : 0; } constructor(parent) { this.parent = parent; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnBase, deps: [{ token: ColumnBase }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnBase, selector: "ng-component", inputs: { title: "title", width: "width", locked: "locked", hidden: "hidden", headerCellOptions: "headerCellOptions" }, queries: [{ propertyName: "children", predicate: ColumnBase }], ngImport: i0, template: '', isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnBase, decorators: [{ type: Component, args: [{ template: '' }] }], ctorParameters: function () { return [{ type: ColumnBase }]; }, propDecorators: { title: [{ type: Input }], width: [{ type: Input }], locked: [{ type: Input }], hidden: [{ type: Input }], headerCellOptions: [{ type: Input }], children: [{ type: ContentChildren, args: [ColumnBase] }] } }); /** * @hidden */ const packageMetadata = { name: '@progress/kendo-angular-excel-export', productName: 'Kendo UI for Angular', productCode: 'KENDOUIANGULAR', productCodes: ['KENDOUIANGULAR'], publishDate: 1750770960, version: '19.1.2', licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/' }; // eslint-disable max-line-length /** * Represents the [Kendo UI Excel Export component for Angular]({% slug overview_excelexport %}). * Use this component to export data to Excel format. * * @example * ```html * <kendo-excelexport [data]="gridData" fileName="MyExport.xlsx"> * <kendo-excelexport-column field="ProductID" title="Product ID"></kendo-excelexport-column> * <kendo-excelexport-column field="ProductName" title="Product Name"></kendo-excelexport-column> * </kendo-excelexport> * ``` * * @remarks * Supported children components are: {@link ColumnComponent}, {@link ColumnGroupComponent}. */ class ExcelExportComponent { localization; zone; /** * Specifies the name of the exported Excel file. * * @default "Export.xlsx" */ fileName = 'Export.xlsx'; /** * Determines whether to enable column filtering in the exported Excel file * ([see example]({% slug filtering_excelexport %})). */ filterable; /** * Determines whether groups in the Excel file are collapsible. */ collapsible; /** * Specifies the author of the workbook. */ creator; /** * Specifies the creation date of the workbook. * The default value is `new Date()`. * * @default `new Date()` */ date; /** * Determines whether to force the use of a proxy server for file downloads. * When set to `true`, the component sends content to `proxyURL` even if the browser supports local file saving. */ forceProxy; /** * Specifies the URL of the server-side proxy that streams the file to the user. * When the browser cannot save files locally (for example, Internet Explorer 9 and earlier, and Safari), the component uses a proxy. * You must implement the server-side proxy. * * The proxy receives a `POST` request with these parameters in the request body: * - `contentType`&mdash;The `MIME` type of the file. * - `base64`&mdash;The `base-64` encoded file content. * - `fileName`&mdash;The requested file name. * The proxy must return the decoded file with the `Content-Disposition` header set to `attachment; filename="<fileName.xslx>"`. */ proxyURL; /** * Specifies the data to export. * When the data is grouped, structure it as described by the * [`GroupResult`]({% slug api_kendo-data-query_groupresult %}) option of the Kendo UI Data Query component. */ data; /** * Specifies the exported data groups. * The groups must match the * [`GroupDescriptor`]({% slug api_kendo-data-query_groupdescriptor %}) option of the Kendo UI Data Query component. */ group; /** * Specifies the options for cells inserted before data, group, and footer cells * to show group hierarchy when the data is grouped * ([see example]({% slug cells_excelexport %}#toc-padding-cells)). */ paddingCellOptions; /** * Specifies the options for cells inserted before header cells * to align headers and column values when the data is grouped * ([see example]({% slug cells_excelexport %}#toc-header-padding-cells)). */ headerPaddingCellOptions; /** * @hidden */ columns = new QueryList(); constructor(localization, zone) { this.localization = localization; this.zone = zone; validatePackage(packageMetadata); this.saveFile = this.saveFile.bind(this); } /** * Exports the data to Excel. * * @param exportData - Optional. The data to export or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}). */ save(exportData) { this.toDataURL(exportData).then(this.saveFile); } /** * Returns [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}) based on the specified columns and data. * Use this method to customize the workbook options. * * @param exportData - Optional. The data to export. * @returns {WorkbookOptions} The workbook options. */ workbookOptions(exportData) { const currentData = this.getExportData(exportData); const options = workbookOptions({ columns: this.columns, data: currentData.data, group: currentData.group, filterable: this.filterable, creator: this.creator, date: this.date, rtl: this.localization.rtl, paddingCellOptions: this.paddingCellOptions, headerPaddingCellOptions: this.headerPaddingCellOptions, collapsible: this.collapsible }); return options; } /** * Returns a promise that resolves with the file data URI. * Use this method to get the Excel file as a data URI. * * @param exportData - Optional. The data or [`WorkbookOptions`]({% slug api_excel-export_workbookoptions %}) to use for generating the data URI. * @returns {Promise<string>} A promise that resolves with the file data URI. */ toDataURL(exportData) { const options = isWorkbookOptions(exportData) ? exportData : this.workbookOptions(exportData); return this.zone.runOutsideAngular(() => toDataURL(options)); } getExportData(exportData) { let result; if (exportData) { if (Array.isArray(exportData)) { result = { data: exportData }; } else { result = exportData; } } else { result = { data: this.data, group: this.group }; } return result; } saveFile(dataURL) { saveAs(dataURL, this.fileName, { forceProxy: this.forceProxy, proxyURL: this.proxyURL }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExcelExportComponent, isStandalone: true, selector: "kendo-excelexport", inputs: { fileName: "fileName", filterable: "filterable", collapsible: "collapsible", creator: "creator", date: "date", forceProxy: "forceProxy", proxyURL: "proxyURL", data: "data", group: "group", paddingCellOptions: "paddingCellOptions", headerPaddingCellOptions: "headerPaddingCellOptions" }, providers: [ LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.excelexport' } ], queries: [{ propertyName: "columns", predicate: ColumnBase, descendants: true }], exportAs: ["kendoExcelExport"], ngImport: i0, template: ``, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportComponent, decorators: [{ type: Component, args: [{ exportAs: 'kendoExcelExport', selector: 'kendo-excelexport', providers: [ LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.excelexport' } ], template: ``, standalone: true }] }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { fileName: [{ type: Input }], filterable: [{ type: Input }], collapsible: [{ type: Input }], creator: [{ type: Input }], date: [{ type: Input }], forceProxy: [{ type: Input }], proxyURL: [{ type: Input }], data: [{ type: Input }], group: [{ type: Input }], paddingCellOptions: [{ type: Input }], headerPaddingCellOptions: [{ type: Input }], columns: [{ type: ContentChildren, args: [ColumnBase, { descendants: true }] }] } }); /** * Represents the footer cell template of the Excel Export column component * ([see example]({% slug columns_excel-export %}#toc-footer-template)). * Use this directive to customize the footer cell of a column. * * @example * ```html * <ng-template kendoExcelExportFooterTemplate let-column let-columnIndex="columnIndex"> * Footer for {{ column.field }} * </ng-template> * ``` */ class FooterTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FooterTemplateDirective, isStandalone: true, selector: "[kendoExcelExportFooterTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FooterTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoExcelExportFooterTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }]; } }); /** * Represents the group header cell template of the Excel Export column component * ([see example]({% slug columns_excel-export %}#toc-group-header-template)). * Use this directive to customize the content of the group header item. * * @example * ```html * <ng-template kendoExcelExportGroupHeaderTemplate let-group let-field="field"> * Group Header for {{ field }} * </ng-template> * ``` */ class GroupHeaderTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupHeaderTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GroupHeaderTemplateDirective, isStandalone: true, selector: "[kendoExcelExportGroupHeaderTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupHeaderTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoExcelExportGroupHeaderTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }]; } }); /** * Represents the group header column template of the Excel Export column component * ([see example]({% slug columns_excel-export %}#toc-group-header-column-template)). * Use this directive to customize the group header column. * * @example * ```html * <ng-template kendoExcelExportGroupHeaderColumnTemplate let-group let-field="field"> * Group Header Column for {{ field }} * </ng-template> * ``` */ class GroupHeaderColumnTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupHeaderColumnTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GroupHeaderColumnTemplateDirective, isStandalone: true, selector: "[kendoExcelExportGroupHeaderColumnTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupHeaderColumnTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoExcelExportGroupHeaderColumnTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }]; } }); /** * Represents the group footer cell template of the Excel Export column component * ([see example]({% slug columns_excel-export %}#toc-group-footer-template)). * Use this directive to customize the group footer cell of a column. * * @example * ```html * <ng-template kendoExcelExportGroupFooterTemplate let-group let-field="field"> * Group Footer for {{ field }} * </ng-template> * ``` */ class GroupFooterTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupFooterTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: GroupFooterTemplateDirective, isStandalone: true, selector: "[kendoExcelExportGroupFooterTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GroupFooterTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoExcelExportGroupFooterTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{ type: Optional }] }]; } }); /** * Represents a column in the Kendo UI Excel Export component for Angular. * Use this component to define the structure and options for each column. * * @example * ```html * <kendo-excelexport-column field="ProductName"></kendo-excelexport-column> * ``` */ class ColumnComponent extends ColumnBase { /** * Specifies the field that the column displays. */ field; /** * Specifies options for the column's data cells * ([see example]({% slug cells_excelexport %}#toc-data-cells)). */ cellOptions; /** * Specifies options for the group header cells of the column * ([see example]({% slug cells_excelexport %}#toc-header-cells)). */ groupHeaderCellOptions; /** * Specifies options for the group footer cells of the column * ([see example]({% slug cells_excelexport %}#toc-group-footer-cells)). */ groupFooterCellOptions; /** * Specifies options for the footer cell of the column * ([see example]({% slug cells_excelexport %}#toc-footer-cells)). */ footerCellOptions; /** * @hidden */ groupHeaderTemplate; /** * @hidden */ groupHeaderColumnTemplate; /** * @hidden */ groupFooterTemplate; /** * @hidden */ footerTemplate; constructor(parent) { super(parent); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnComponent, deps: [{ token: ColumnBase, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnComponent, isStandalone: true, selector: "kendo-excelexport-column", inputs: { field: "field", cellOptions: "cellOptions", groupHeaderCellOptions: "groupHeaderCellOptions", groupFooterCellOptions: "groupFooterCellOptions", footerCellOptions: "footerCellOptions" }, providers: [ { provide: ColumnBase, useExisting: forwardRef(() => ColumnComponent) } ], queries: [{ propertyName: "groupHeaderTemplate", first: true, predicate: GroupHeaderTemplateDirective, descendants: true }, { propertyName: "groupHeaderColumnTemplate", first: true, predicate: GroupHeaderColumnTemplateDirective, descendants: true }, { propertyName: "groupFooterTemplate", first: true, predicate: GroupFooterTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: ``, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnComponent, decorators: [{ type: Component, args: [{ providers: [ { provide: ColumnBase, useExisting: forwardRef(() => ColumnComponent) } ], selector: 'kendo-excelexport-column', template: ``, standalone: true }] }], ctorParameters: function () { return [{ type: ColumnBase, decorators: [{ type: SkipSelf }, { type: Host }, { type: Optional }] }]; }, propDecorators: { field: [{ type: Input }], cellOptions: [{ type: Input }], groupHeaderCellOptions: [{ type: Input }], groupFooterCellOptions: [{ type: Input }], footerCellOptions: [{ type: Input }], groupHeaderTemplate: [{ type: ContentChild, args: [GroupHeaderTemplateDirective, { static: false }] }], groupHeaderColumnTemplate: [{ type: ContentChild, args: [GroupHeaderColumnTemplateDirective, { static: false }] }], groupFooterTemplate: [{ type: ContentChild, args: [GroupFooterTemplateDirective, { static: false }] }], footerTemplate: [{ type: ContentChild, args: [FooterTemplateDirective, { static: false }] }] } }); /** * Represents a group of columns in the Kendo UI Excel Export component. * Use this component to organize columns into groups. * * @example * ```html * <kendo-excelexport-column-group> * <kendo-excelexport-column field="ProductName"></kendo-excelexport-column> * <kendo-excelexport-column field="UnitPrice"></kendo-excelexport-column> * </kendo-excelexport-column-group> * ``` */ class ColumnGroupComponent extends ColumnBase { parent; constructor(parent) { super(parent); this.parent = parent; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnGroupComponent, deps: [{ token: ColumnBase, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColumnGroupComponent, isStandalone: true, selector: "kendo-excelexport-column-group", providers: [ { provide: ColumnBase, useExisting: forwardRef(() => ColumnGroupComponent) } ], usesInheritance: true, ngImport: i0, template: ``, isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColumnGroupComponent, decorators: [{ type: Component, args: [{ providers: [ { provide: ColumnBase, useExisting: forwardRef(() => ColumnGroupComponent) } ], selector: 'kendo-excelexport-column-group', template: ``, standalone: true }] }], ctorParameters: function () { return [{ type: ColumnBase, decorators: [{ type: SkipSelf }, { type: Host }, { type: Optional }] }]; } }); /** * Use this utility array to access all `@progress/kendo-angular-excel-export` related components and directives. */ const KENDO_EXCELEXPORT = [ ExcelExportComponent, ColumnComponent, ColumnGroupComponent, FooterTemplateDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderTemplateDirective ]; // IMPORTANT: NgModule export kept for backwards compatibility /** * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the Excel Export component. * * Use this module to enable Excel export features in your application. * * @example * ```typescript * import { ExcelExportModule } from '@progress/kendo-angular-excel-export'; * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; * import { NgModule } from '@angular/core'; * import { AppComponent } from './app.component'; * * @NgModule({ * declarations: [AppComponent], * imports: [BrowserModule, ExcelExportModule], * bootstrap: [AppComponent] * }) * export class AppModule {} * * platformBrowserDynamic().bootstrapModule(AppModule); * ``` */ class ExcelExportModule { static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportModule, imports: [ExcelExportComponent, ColumnComponent, ColumnGroupComponent, FooterTemplateDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderTemplateDirective], exports: [ExcelExportComponent, ColumnComponent, ColumnGroupComponent, FooterTemplateDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderTemplateDirective] }); static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportModule }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExcelExportModule, decorators: [{ type: NgModule, args: [{ imports: [...KENDO_EXCELEXPORT], exports: [...KENDO_EXCELEXPORT] }] }] }); /** * Generated bundle index. Do not edit. */ export { ColumnBase, ColumnComponent, ColumnGroupComponent, ExcelExportComponent, ExcelExportModule, FooterTemplateDirective, GroupFooterTemplateDirective, GroupHeaderColumnTemplateDirective, GroupHeaderTemplateDirective, KENDO_EXCELEXPORT, isWorkbookOptions, toDataURL, workbookOptions };