Sign in Join
FPDoc Onlineexperiment

TCSVBuilder class

In unit CsvReadWrite

Class to write a CSV file.

Declaration

pascal
TCSVBuilder = class(TCSVHandler)

Inheritance

  1. TCSVBuilder
  2. TCSVHandler
  3. TPersistent
  4. TObject

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

Properties

DefaultOutputpublicDefault output as stream.
DefaultOutputAsStringpublicDefault output as string value.

Methods

AppendStringToStreamprotected
QuoteCSVStringprotected
CreatepublicCreate a new instance of TCSVBuilder.
DestroypublicFree a TCSVBuilder instance.
SetOutputpublicSet the output stream to write to.
ResetBuilderpublicReset values.
AppendCellpublicAppend a cell to the output.
AppendRowpublicAppend a new row.

Inherited

From TCSVHandler (8)

Assign AssignCSVProperties Delimiter EqualColCountPerRow IgnoreOuterWhitespace LineEnding QuoteChar QuoteOuterWhitespace

From TPersistent (7)

AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers GetNamePath GetOwner

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

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