@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
86 lines (85 loc) • 4.54 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { OnDestroy, QueryList, NgZone } from '@angular/core';
import { ExcelExportData, ColumnBase, CellOptions } from '@progress/kendo-angular-excel-export';
import { GridComponent } from '../grid.component';
import { ExcelService } from './excel.service';
import { FetchDataCallback } from '../common/fetch-data-callback';
import { ContextService } from '../common/provider.service';
import * as i0 from "@angular/core";
/**
* The component is required when exporting the data to an Excel file. The componnet provides different options to further configure the Excel export settings of the Grid ([see example]({% slug excelexport_grid %})).
*
* @example
* ```html
* <kendo-grid>
* <kendo-grid-excel fileName="Export.xlsx"></kendo-grid-excel>
* </kendo-grid>
* ```
*/
export declare class ExcelComponent implements OnDestroy {
private ctx;
private zone;
/**
* Sets the file name for the exported Excel file.
* @default "Export.xlsx"
*/
fileName: string;
/**
* Enables or disables column filtering in the Excel file. This option is different from the Grid's filtering feature.
*/
filterable: boolean;
/**
* Sets the author of the workbook.
*/
creator?: string;
/**
* Sets the creation date of the workbook.
*/
date?: Date;
/**
* Forwards the content to [`proxyURL`](#toc-proxyurl) even if the browser supports local file saving when set to `true`.
*/
forceProxy: boolean;
/**
* Sets the URL of the server-side proxy that streams the file to the user. Use a proxy if the browser cannot save files locally.
* You can also use a proxy to reduce memory usage by transmitting the file over the network.
* Set [`forceProxy`](#toc-forceproxy) to `true` to skip client-side saving.
* The proxy receives a POST request with specific parameters and returns the decoded file with the `"Content-Disposition"` header set to `attachment; filename="<fileName.xslx>"`.
* For more details, see the [File Saver]({% slug overview_filesaver %}) documentation.
*/
proxyURL: string;
/**
* Provides a function to get the exported data options. By default, uses the current Grid data and group.
* Supply a custom function to export different data. Typically used to export all data, not just the current page [see example](slug:excelexport_grid#exporting-specific-data).
*/
fetchData: FetchDataCallback;
/**
* Sets options for cells inserted before the data, group, and footer cells to indicate the group hierarchy if the data is grouped.
*
*/
paddingCellOptions: CellOptions;
/**
* Sets the options for cells inserted before the header cells to align the headers and the column values when the data is grouped.
*/
headerPaddingCellOptions: CellOptions;
/**
* Specifies if groups in the Excel file are collapsible.
*/
collapsible: boolean;
/**
* @hidden
*/
columns: QueryList<ColumnBase>;
private saveSubscription;
private dataSubscription;
constructor(excelService: ExcelService, ctx: ContextService, zone: NgZone);
ngOnDestroy(): void;
protected save(component: GridComponent): void;
protected exportData(component: GridComponent, result: ExcelExportData): void;
protected saveFile(options: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ExcelComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ExcelComponent, "kendo-grid-excel", never, { "fileName": { "alias": "fileName"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "creator": { "alias": "creator"; "required": false; }; "date": { "alias": "date"; "required": false; }; "forceProxy": { "alias": "forceProxy"; "required": false; }; "proxyURL": { "alias": "proxyURL"; "required": false; }; "fetchData": { "alias": "fetchData"; "required": false; }; "paddingCellOptions": { "alias": "paddingCellOptions"; "required": false; }; "headerPaddingCellOptions": { "alias": "headerPaddingCellOptions"; "required": false; }; "collapsible": { "alias": "collapsible"; "required": false; }; }, {}, ["columns"], never, true, never>;
}