[Lazarus] CSV parser class

Vladimir Zhirov vvzh.lists at gmail.com
Sun Jan 24 12:27:50 CET 2010

> Have you seen the built-in CSV support in TStrings?

Yes, if I understand the documentation right, it can be used for basic
per-line csv parsing only (using DelimitedText). It also requires to
quote all characters below some code point, including spaces, that
makes it impossible to read csv files saved from OO Calc or MSO Excel.
If I'm wrong I would appreciate if someone point out my mistake.

> Or the TSDFDataset class in sdfdata ?
> Or the two different implementations in tiOPF project.  :)

No, I haven't seen either of those. A quick search shows TSDFDataset
has field length limit. This approach can greatly improve performance
on large datasets, but it is not very convenient for me, because I use
CSV to exchange data with Calc/Excel and cannot expect field length 
to be limited, or at least I don't know the limit.

As of tiOPF CSV implementation, I'm afraid it is already too late :)
It might have been a good idea to ask for implementations on the
mailing list before reinventing the wheel, but such basic formats
are quicker to reimplement than to thoroughly search the web for.

> Anyway, to get your code in the CCR, I normally email Vincent the code
> in private.

That's what I've done.

> Thought I must say, I don't really see the point of the CCR.

Well, I thought of making it a separate project, but decided to start
with CCR. First, it is still too small piece of code to be a project of
its own. Then I believe CCR is the first place to go when searching for
components, so it will be easier to find it there. Once the code needs
to be updated quicker than CCR allows, it can always be moved to
sf.net/github/whatever, but I don't feel such a need for this project
at the moment.

Best regards,
Vladimir Zhirov

More information about the Lazarus mailing list