Previous Topic

Next Topic

LoadFromFile - Memory Table Method

method LoadFromFile(Filename: String, Delimiter: Variant[, HasHeader: Boolean, Quoted: Boolean, RecordTerminator: Variant, FileType: Integer])

LoadFromFile method populates a Memory Table from a delimited file.

LoadFromFile method syntax has these named arguments:

Parameter

Description

File Name

Required. Name of the delimited file to load from.

Delimiter

Required. The delimiter character or number. If a number is used, the valid values are:

0 = CSV, no headers

1 = CSV, with headers

2 = Tab delimited, no headers

3 = Tab delimited, with headers

Has Header

Optional. Set to True when the file contains a header line. Defaults to False.

Quoted

Optional. This is ignored when the Delimiter is a number.

When True, reads string values in quotes. Defaults to False.

RecordTerminator

Optional. The character to signify the end of the record.

File Type

Optional. Integer.
0 - ANSI
1 - UTF16_LE
2 - UTF16_BE
3 - UTF8
4 - UTF8BOM

If this parameter is not specified, then encoding will be auto detected from the file.

See also the Stringlist Object LoadFromFile method.

For example:

  MemTable.LoadFromFile(FileName: String, Delimiter: String(1) or Number[, HasHeader: Boolean])

See Also

Memory Tables

Book Contents

Book Index