Skip to content

TCSVDocument.SaveToStream

Save the CSV data to stream.

Declaration

Source position: csvdocument.pp line 101

public 
procedure TCSVDocument.SaveToStream(AStream: TStream);

Description

SaveToStream saves the CSV data to the aStream stream. It uses the settings introduced in TCSVHandler to apply the correct formatting to fields and rows. If EqualColCountPerRow is True then it will add empty cells prior to writing, so all rows in the file have an equal count of columns.

Errors

If the stream cannot be written to, an exception will be raised.

See also

Name Description
EqualColCountPerRow Ensure every row has an equal amount of columns.
SaveToFile Save to file on disk.
LoadFromStream Load CSV data from a stream.
LoadFromFile Load a CSV file into the document.
TCSVHandler Base class for CSV reading and writing classes.