|
Description
Saves the contents of a DataWindow or DataStore into a standard ASCII text file.
Controls
DataWindow controls and DataStore objects
Syntax
dwcontrol.SaveAsAscii( filename {, separatorcharacter {,quotecharacter {, lineending } } })
|
Argument
|
Description
|
|
|
dwcontrol
|
The name of the DataWindow control or DataStore whose contents you want to save
|
|
|
filename
|
A string whose value is the name of the file in which to save the contents
|
|
|
separatorcharacter(optional)
|
A string whose value is the character to be used to delimit values. If you omit separatorcharacter, the default is a tab character
|
|
|
quotecharacter(optional)
|
A string whose value is the character to be used to wrap values. If you omit quotecharacter, the default is no character
|
|
|
lineending(optional)
|
A string whose value is placed at the end of each line. If you omit lineending, the default is a carriage return plus a newline character (~r~n)
|
|
|
Return value
Long. Returns 1 if it succeeds and -1 if an error occurs.
Usage
SaveAsAscii is a cross between the SaveAs (Text!) function and the SaveAs (HTMLTable!) function with additional arguments. It mirrors more closely what the user sees on the screen. Arguments allow the user to control how contents are separated and delimited in the ASCII file. PowerBuilder assigns a cell for each DataWindow object (which can include computed columns and group totals). If a cell is empty, PowerBuilder puts the quotecharacter between the separatorcharacter in the output file.
|