Skip to main content

VCL Vertical Grid: Data Export

  • 3 minutes to read

VCL Vertical Grid controls ship with a series of global data export methods declared in the cxExportVGLink unit. You can call these methods to export vertical grid content to a file in CSV, HTML, TXT, XLS, XLSX, and XML formats. To track the export progress and perform additional actions before an export operation, you can pass a handler object as the optional AHandler parameter available for every data export method. The handler object should implement the IcxExportProgress and/or IcxExportBeforeSave interfaces declared in the cxExport unit. Refer to the following topic for detailed information on handler objects and a code example: How to: Track Data Export Progress.

Plain Text-Based Formats

Plain text-based formats include CSV and TXT. Use these lean formats if you need to keep the exported data size to a minimum. Remember that plain text-based formats cannot preserve data layouts and appearance settings as customized by you or your users.

In comma-separated values (CSV) format, every plain text line of values separated by commas corresponds to a data record. You can pass another character as the optional ASeparator parameter to use it instead of a comma. Like CSV, the plain text format stores exported data as plain text without formatting, style, or print layout information. Compared to CSV, exported TXT files are more human-readable. You can use the optional ASeparator, ABeginString, and AEndString parameters of the export methods to delimit cell values in the resulting file or stream.

cxExportVGToCSV
Exports content of a vertical grid control to a file in CSV (comma-separated values) format.
cxExportVGToText
Exports content of a vertical grid control to a file in plain text format.

Markup Language Formats

Markup language formats include HTML and XML. Unlike plain text, these formats allow you to export the original data layout as is and take style and look & feel settings into account. Export methods in this category create image files to display cell images as inline images in the output file or stream.

cxExportVGToHTML
Exports content of a vertical grid control to a file in HTML format.
cxExportVGToXML
Exports content of a vertical grid control to a file in XML format.

Spreadsheet Document Formats

Spreadsheet document formats include Office Open XML (XLSX) and Microsoft Excel® binary spreadsheet (XLS) formats. Like markup language formats, they allow you to export grid content as is, including the data layout, style, and look & feel settings.

cxExportVGToExcel
Exports content of a vertical grid control to a file in Microsoft Excel® binary format (XLS).
cxExportVGToXLSX
Exports content of a vertical grid control to a file in Office Open XML format.

Limitations

The data export procedures export only the currently cached records when the source vertical grid control is in Grid Mode.