VCL Tree List: Data Export
- 3 minutes to read
VCL Tree List controls ship with a series of global data export methods declared in the cxTLExportLink unit. You can call these methods to export tree list content to a file in CSV, HTML, TXT, XLS, XLSX, and XML formats. To track 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 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.
- cxExportTLToCSV
- Exports content of a tree list control to a file in CSV (comma-separated values) format.
- cxExportTLToCSVStream
- Exports content of a tree list control to a stream in CSV (comma-separated values) format.
- cxExportTLToText
- Exports content of a tree list control to a file in plain text format.
- cxExportTLToTextStream
- Exports content of a tree list control to a stream 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.
- cxExportTLToHTML
- Exports content of a tree list control to a file in HTML format.
- cxExportTLToHTMLStream
- Exports content of a tree list control to a stream in HTML format.
- cxExportTLToXML
- Exports content of a tree list 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.
- cxExportTLToExcel
- Exports content of a tree list control to a file in Microsoft Excel® binary format (XLS).
- cxExportTLToExcelStream
- Exports content of a tree list control to a stream in Microsoft Excel® binary format (XLS).
- cxExportTLToXLSX
- Exports content of a tree list control to a file in Office Open XML spreadsheet format (XLSX).
- cxExportTLToXLSXStream
- Exports content of a tree list control to a stream in Office Open XML spreadsheet format (XLSX).