Unit 'csvdocument' Package
[Overview][Types][Classes][Index] [#fcl]

TCSVDocument.LoadFromFile

Load a CSV file into the document.

Declaration

Source position: csvdocument.pp line 93

public procedure TCSVDocument.LoadFromFile(

  const AFilename: string

); overload;

procedure TCSVDocument.LoadFromFile(

  const AFilename: string;

  ABufferSize: Integer

); overload;

Arguments

AFilename

  

Filename to read CSV data from.

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

LoadFromStream

  

Load CSV data from a stream.

SaveToStream

  

Save the CSV data to stream.

SaveToFile

  

Save to file on disk.


Documentation generated on: Jul 22 2024