Unit 'csvreadwrite' Package
[Overview][Types][Classes][Procedures and functions][Index] [#fcl]

TCSVHandler

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for CSV reading and writing classes.

Declaration

Source position: csvreadwrite.pp line 52

type TCSVHandler = class(TPersistent)

public

  constructor Create; virtual;

  

Create an instance of TCSVHandler

  procedure Assign(); override;

  

Assign properties from another TCSVHandler instance

  procedure AssignCSVProperties();

  

Assign properties from another TCSVHandler instance

  property Delimiter: TCSVChar; [rw]

  

Field delimiter character

  property QuoteChar: TCSVChar; [rw]

  

Character to quote values

  property LineEnding: string; [rw]

  

Line ending character

  property IgnoreOuterWhitespace: Boolean; [rw]

  

Ignore whitespace between delimiters and field data

  property QuoteOuterWhitespace: Boolean; [rw]

  

Write quotes when outer whitespace is found in a value

  property EqualColCountPerRow: Boolean; [rw]

  

Ensure every row has an equal amount of columns.

end;

Inheritance

TCSVHandler

  

Base class for CSV reading and writing classes.

|

TPersistent

|

TObject,IFPObserved

Description

TCSVHandler is the base class for class TCSVParser which allows you to read a CSV file, and class TCSVBuilder which allows you to write a CSV file. It defines some common properties for these classes, mainly to describe the formatting of the CSV file, such as the Delimiter or QuoteChar and LineEnding properties.

Normally you will not create an instance of TCSVHandler, instead you will create a TCSVParser or TCSVBuilder instance.

See also

TCSVParser

  

Class to parse a CSV file

TCSVBuilder

  

Class to write a CSV file

Delimiter

  

Field delimiter character

QuoteChar

  

Character to quote values

LineEnding

  

Line ending character


Documentation generated on: Sep 29 2022