Sign in Join
FPDoc Onlineexperiment

TCSVDocument.LoadFromFile procedure

Member of TCSVDocumentpublicIn unit CsvDocument

Load a CSV file into the document.

Declaration

pascal
procedure LoadFromFile(const AFilename: string); overload
procedure LoadFromFile(const AFilename: string; ABufferSize: Integer)
 ; overload

Arguments

AFilename

Filename to read CSV data from.

ABufferSize

Buffer size to use when reading CSV data from file.

Description

LoadFromFile creates a file stream using aFileName and calls LoadFromStream to read the contents of the file.

The file is read using an internal buffer for efficiency. The size of the buffer can be specified in bytes using ABufferSize. If the size is not specified, a default buffer size is used.

Errors

If the file does not exist, an exception will be raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.