Object Reference > True DBGrid Methods > ExportToDelimitedFile Method |
ExportToDelimitedFile Method
The ExportToDelimitedFile method exports the specified rows from the grid to the specified file as delimited ASCII text, where each row (record) occupies its own line.
TDBGrid.ExportToDelimitedFile pathname, [delim], [selector], [prefix], [suffix]
Arguments
pathname specifies the file to which grid rows are exported.
delim specifies an optional delimiter string used to separate fields.
selector is an optional value that specifies the rows to be exported.
prefix specifies an optional string used with suffix to surround each value.
suffix specifies an optional string used with prefix to surround each value.
Return Value
None
Fields are delimited by the delim string (the default delim is empty). Field values can also be placed between a prefix string and suffix string.
The selector argument determines the rows to be exported. It can be one of the following constant values:
0 - dbgAllRows |
All available rows are exported. If the selector argument is omitted, this value is assumed. |
1 - dbgSelectedRows |
Only selected rows are exported. The grid's SelBookmarks collection contains a bookmark for each selected row. |
2 - dbgCurrentRow |
Only the current row is exported. |