WriteFields

Writes data to a sequential file.

Syntax

file.WriteFields [Data]

The parts of the WriteFields statement syntax are described in the following table.

Part Description
Data Variant or Variant array of numeric or string expressions to write to a file.

Remarks

Data written with WriteFields is usually read from a file with InputFields.

If you omit Data, a blank line is printed to the file.

When WriteFields is used to write data to a file, several universal assumptions are followed so the data can always be read and correctly interpreted using InputFields, regardless of locale:

The WriteFields statement inserts commas between items and quotation marks around strings as they are written to the file. You do not have to put explicit delimiters in the list. WriteFields inserts a newline character, that is, a carriage return–linefeed (Chr(13) + Chr(10)), after it has written the final character in Data to the file.