Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

TCSVDataSource

Delphi CSV parser

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

TObject - TCSVDataSource

CSV parser for Delphi Free. Fields as String, Integer or Extended.

Usage:

pascal
  var Source: TCSVDataSource;

  Source := TCSVDataSource.Create;
  try
    Source.SetDelimiter(Char(59));
    Source.LoadFromFile(FileName);

    while not Source.Eof do
    begin

      ShowMessage(Source.FieldByNameAsString('CARDHOLDER'));

      Source.Next;
    end;
  finally
    Source.Free;
  end;
  end;