cxExportPivotGridDataToExcel(string,TcxCustomPivotGrid,TObject,Boolean,Boolean,Boolean,Boolean) Method
Exports unformatted data from a pivot grid to a file in XLS or XLSX format.
Declaration
procedure cxExportPivotGridDataToExcel(const AFileName: string; APivotGrid: TcxCustomPivotGrid; AHandler: TObject = nil; AAutoBestFit: Boolean = True; AHighlightTotals: Boolean = True; ACellBorders: Boolean = True; AFieldHeaders: Boolean = False);
Parameters
Name | Type | Description |
---|---|---|
AFileName | string | The full path to the resulting XLSX or XLS file. The specified file name extension determines the target data export format – Office Open XML (XLSX) or Microsoft Excel® binary format (XLS). |
APivotGrid | TcxCustomPivotGrid | The source pivot grid control. |
AHandler | TObject | Optional. Specifies a handler object that should implement the IcxExportBeforeSave and/or IcxExportProgress interfaces to allow you to perform specific actions before the beginning of an export operation and track its progress. Tip Refer to the following topic for detailed information on how to create and use handler objects: |
AAutoBestFit | Boolean | Optional. If |
AHighlightTotals | Boolean | Optional. If |
ACellBorders | Boolean | Optional. If |
AFieldHeaders | Boolean | Optional. If |
Remarks
Call the cxExportPivotGridDataToExcel
procedure to export pivot grid data in XLS or XLSX format. Unlike the cxExportPivotGridToExcel and cxExportPivotGridToXLSX procedures, cxExportPivotGridDataToExcel
exports only data in a simplified layout, without style information. The resulting file includes outlined groups and frozen panes to simplify data browsing and analysis in the Spreadsheet control or a third-party spreadsheet application.
Code Example
The following code example exports pivot grid data to a file in XLSX format:
uses cxExportPivotGridLink;
// ...
cxExportPivotGridDataToExcel('Payments.xlsx', UnboundPivotGrid);