Exports the specified rows from the grid to the specified file as delimited text.
[Visual Basic]
Overloads Public Sub ExportToDelimitedFile( _
ByVal filename As String, _
ByVal selector As RowSelectorEnum, _
ByVal delim As String, _
ByVal prefix As String, _
ByVal suffix As String, _
ByVal headers As Boolean _
)
[C#]
public void ExportToDelimitedFile(
string filename,
RowSelectorEnum selector,
string delim,
string prefix,
string suffix,
bool headers
);
[Delphi]
public procedure ExportToDelimitedFile(
filename: String;
selector: RowSelectorEnum;
delim: String;
prefix: String;
suffix: String;
headers: Boolean
); overload;
Example
The following code exports all rows in the grid (delimited by a comma, without a prefix or suffix, and displaying column headers) to a delmited file in the temp directory:
Me.C1TrueDBGrid1.ExportToDelimitedFile("c:\temp\composers.csv", C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ",", " ", " ", True)
· C#
this.c1TrueDBGrid1.ExportToDelimitedFile(@"c:\temp\composers.csv", C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ",", " ", " ", true);
· Delphi
Self.C1TrueDBGrid1.ExportToDelimitedFile('c:\temp\composers.csv', C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ',', ' ', ' ', True);
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.ExportToDelimitedFile Overload List
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |