![]() |
![]() ![]() ![]() |
acListView and acDBListView components.
|
procedure ExportToTXT(const FileName: String; ExportColumnCaptions: Boolean = True);
|
The ExportToTXT procedure can export all items and columns (if ExportColumCaption parameter is True) to the text file specified in FileName parameter.
|
|
Each row separated by CRLF (#13#10) characters, every column separated by Tab (#9) character.
|
procedure TMainForm.AsTXT1Click(Sender: TObject);
|
const
|
EXT_TYPE: Array[0..1] of String = ('TXT', 'HTML');
|
ExportConnectionsStr = 'Export Connections to %s file';
|
begin
|
with SaveDialog1, (Sender as TComponent) do
|
begin
|
DefaultExt := EXT_TYPE[Tag];
|
Title := Format(ExportConnectionsStr, [UpperCase(DefaultExt)]);
|
FilterIndex := Tag + 1;
|
if Execute then
|
if Tag = 0 then
|
acListView1.ExportToTXT(FileName)
|
else
|
acListView1.ExportToHTML(FileName);
|
end;
|
end;
|
ImportFromTXT and ExportToHTML methods.
|