[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Class representing a CSV document in memory.
Source position: csvdocument.pp line 69
type TCSVDocument = class(TCSVHandler) |
||
public |
||
constructor Create; override; |
|
Create a new instance of TCSVDocument. |
destructor Destroy; override; |
|
Remove the TCSVDocument instance from memory. |
procedure LoadFromFile(); |
|
Load a CSV file into the document. |
procedure LoadFromStream(); |
|
Load CSV data from a stream. |
procedure SaveToFile(); |
|
Save to file on disk. |
procedure SaveToStream(); |
|
Save the CSV data to stream. |
procedure AddRow(); |
|
Add a new row to the CSV Data. |
procedure AddCell(); |
|
Add a new cell to a row. |
procedure InsertRow(); |
|
Insert row before row number aRow. |
procedure InsertCell(); |
|
Insert cell at specified position. |
procedure RemoveRow(); |
|
Remove a row. |
procedure RemoveCell(); |
|
Remove a cell at a particular row. |
function HasRow(); |
|
Test if a row exists. |
function HasCell(); |
|
Test if a cell exists. |
function IndexOfCol(); |
|
Test whether a value exists at a given row. |
function IndexOfRow(); |
|
Test whether a value exists at a given column. |
procedure Clear; |
|
Remove all rows. |
procedure CloneRow(); |
|
Duplicate a row. |
procedure ExchangeRows(); |
|
Exchange positions of 2 rows. |
procedure UnifyEmbeddedLineEndings; |
|
Ensures all values have the same line ending/. |
procedure RemoveTrailingEmptyCells; |
|
Remove empty cells at the end of each row. |
property DetectBOM: Boolean; [rw] |
||
property Cells []: string; default; [rw] |
|
Array access to all cells. |
|
Number of available rows. |
|
|
Return the column count for a given row. |
|
property MaxColCount: Integer; [r] |
|
Maximum column count. |
property CSVText: string; [rw] |
|
Return the CSV Document as a single CSV text. |
end; |
|
Class representing a CSV document in memory. |
|
| | ||
|
Base class for CSV reading and writing classes. |
|
| | ||
| | ||
TObject,IFPObserved |
TCSVDocument can be used to read a CSV file in memory using e.g. LoadFromFile, manipulate the contents using the Cells property. Additional rows can be added using AddRow, additional cells can be added using AddCell. After all is done, the SaveToFile method can be used to save the new content to file. The various properties introduced in csvreadwrite.TCSVHandler can be used to configure the format of the CSV file.
|
Load a CSV file into the document. |
|
|
Array access to all cells. |
|
|
Add a new row to the CSV Data. |
|
|
Add a new cell to a row. |
|
|
Save to file on disk. |
|
|
Base class for CSV reading and writing classes. |