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

TCSVBuilder

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

Class to write a CSV file.

Declaration

Source position: csvreadwrite.pp line 167

type TCSVBuilder = class(TCSVHandler)

public

  constructor Create; override;

  

Create a new instance of TCSVBuilder.

  destructor Destroy; override;

  

Free a TCSVBuilder instance.

  procedure SetOutput();

  

Set the output stream to write to.

  procedure ResetBuilder;

  

Reset values.

  procedure AppendCell();

  

Append a cell to the output.

  procedure AppendRow;

  

Append a new row.

  property DefaultOutput: TMemoryStream; [r]

  

Default output as stream.

  property DefaultOutputAsString: string; [r]

  

Default output as string value.

end;

Inheritance

TCSVBuilder

  

Class to write a CSV file.

|

TCSVHandler

  

Base class for CSV reading and writing classes.

|

TPersistent

|

TObject,IFPObserved

Description

TCSVBuilder can be used to correctly write a CSV file. To use it, optionally set a stream to which the CSV file will be written using SetOutput, call AppendCell for each cell you wish to write, and call AppendRow when you want to start a new line. If you didn't specify an output stream, the output is available in DefaultOutput or DefaultOutputAsString.

See also

SetOutput

  

Set the output stream to write to.

AppendCell

  

Append a cell to the output.

AppendRow

  

Append a new row.

DefaultOutput

  

Default output as stream.

DefaultOutputAsString

  

Default output as string value.


Documentation generated on: Dec 26 2024