cxExportPivotGridToFile(string,TcxCustomPivotGrid,Integer,Boolean,Boolean,string[],string,TObject,TEncoding) Method
Exports content of a pivot grid to a file in a specified format.
Declaration
procedure cxExportPivotGridToFile(AFileName: string; APivotGrid: TcxCustomPivotGrid; AExportType: Integer; AExpand: Boolean; AUseNativeFormat: Boolean; const ASeparators: array of string; const AFileExt: string; AHandler: TObject = nil; AEncoding: TEncoding = nil);
Parameters
Name | Type | Description |
---|---|---|
AFileName | string | The full path to the resulting file. You can omit the file name extension because it is automatically updated from the |
APivotGrid | TcxCustomPivotGrid | The source pivot grid control. |
AExportType | Integer | Specifies the target export format. You can pass one of the following public constants as this parameter: cxExportToBinary, cxExportToCSV, cxExportToHtml, cxExportToXml, cxExportToText, cxExportToXlsx. These public constants are declared in the cxExport unit. |
AExpand | Boolean | If |
AUseNativeFormat | Boolean | If |
ASeparators | string | Specifies the value separator character as well as the prefix and postfix strings. The |
AFileExt | string | Specifies the file name extension of the resulting file. This parameter value always replaces the file name extension passed as a part of the |
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: |
AEncoding | TEncoding | Optional. Specifies the character encoding format of the resulting file. If |
Remarks
Call the cxExportPivotGridToFile
procedure to export content of a pivot grid control to a file in any supported format.
Code Example
The following code example exports content of an unbound pivot grid control to a file in XLSX format:
uses cxExportPivotGridLink;
// ...
cxExportPivotGridToFile('Payments.xlsx', UnboundPivotGrid, cxExportToXLSX, True, True, [], 'xlsx');