devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
99 lines (91 loc) • 4.34 kB
TypeScript
/**
* DevExtreme (excel_exporter.d.ts)
* Version: 20.1.7
* Build date: Tue Aug 25 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import dxDataGrid, { dxDataGridColumn } from './ui/data_grid';
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface ExcelDataGridCell {
/** The configuration of the cell's column. */
column?: dxDataGridColumn;
/** The data object of the cell's row. */
data?: any;
/** The group index of the cell's row. Available when the rowType is "group". */
groupIndex?: number;
/** Information about group summary items the cell represents. */
groupSummaryItems?: Array<{ name?: string, value?: any }>;
/** The type of the cell's row. */
rowType?: string;
/** The identifier of the total summary item that the cell represents. */
totalSummaryItemName?: string;
/** The cell's raw value. */
value?: any;
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface CellAddress {
/** The index of a row that contains the cell. */
row?: number;
/** The index of a column that contains the cell. */
column?: number;
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface CellRange {
/** Coordinates of the top left cell. */
from?: CellAddress;
/** Coordinates of the bottom right cell. */
to?: CellAddress;
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface ExportLoadPanel {
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies whether the load panel is enabled. */
enabled?: boolean;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies text displayed on the load panel. */
text?: string;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies the width of the load panel in pixels. */
width?: number;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies the height of the load panel in pixels. */
height?: number;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies whether to show the loading indicator. */
showIndicator?: boolean;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies a URL pointing to an image to be used as a loading indicator. */
indicatorSrc?: string;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies whether to show the pane of the load panel. */
showPane?: boolean;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies whether to shade the widget when the load panel is shown. */
shading?: boolean;
/** Warning! This type is used for internal purposes. Do not import it directly. */
/** Specifies the shading color. Applies only if shading is true. */
shadingColor?: string;
}
/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface ExportDataGridProps {
/** A DataGrid instance. This setting is required. */
component?: dxDataGrid;
/** An Excel worksheet to which the DataGrid should be exported. */
worksheet?: object;
/** A cell used as a start position for export. */
topLeftCell?: CellAddress | string;
/** Specifies whether to export only selected rows. */
selectedRowsOnly?: boolean;
/** Specifies whether to enable Excel filtering in the document. */
autoFilterEnabled?: boolean;
/** Specifies whether Excel columns should have the same width as their source DataGrid columns. */
keepColumnWidths?: boolean;
/** Customizes an Excel cell after creation. */
customizeCell?: ((options: { gridCell?: ExcelDataGridCell, excelCell?: any}) => any);
/** Configures the load panel. */
loadPanel?: ExportLoadPanel;
}
/** Exports grid data to Excel. */
export function exportDataGrid(options: ExportDataGridProps): Promise<CellRange> & JQueryPromise<CellRange>;