|
ExportASCII() 
Exports the contents of an array variable to an
ASCII text file.
Syntax
ExportASCII(<aTran>, <cFile>,
[<xType] ) --> lSuccess
Arguments
<aTran> --> An
array variable containing the data to write to the file.
<cFile> --> The name of the ASCII text
file to export. Path information should be included. If a path is
not specified, the file defaults to the currently open company
folder. If a file extension is not specified, the extension .TXT is
added to the file.
<cType> --> The ASCII file type or
delimiter used if the file is of CSV type.
Values may include:
|
DEL
|
The file is a
standard ASCII comma delimited text file where fields are enclosed
in double-quote marks and separated by commas. Fields and records
may be of variable length.
|
|
TAB
|
Tab
delimited
|
|
<x>
|
Where <x> is
the delimiter used. For example, to import a tab delimited ASCII
text file specify the delimiter as '8'. Fields and records may be
of variable length.
|
Returns
Returns logical TRUE is the file export was
successful. Ensure that the path you specify exists before calling
this function.
Description
This function accepts three parameters: a data
array to write, the file to create, and the delimiter to use when
creating the ASCII text file. If the creation process fails, a
FALSE condition is returned. If a file already exists with the same
file name, it will be overwritten.
Example
* Create an ASCII table based on the
contents of an array
Declare aTran Type Array
aTran := { { "Hello World", "1234",
Today() } }
ExportASCII(aTran, "Test", "DEL")
____________________________
Related Topics
Business
Function List
ImportASCII()
|