There are special codes for integer, floating point, iso date-time, and other fields. You just drop it on your form, and set the FieldDefs property like this: It also contains a stream class that will very quickly load a file on disk, and parse it line by line, using the correct escape rules required for CSV files, even files that include carriage-return/line-feed codes encoded within a field. You can install JVCL, drop a TJvCsvDataSet on your form. I wrote a Dataset (TTable-like object) for Jedi project called TJvCsvDataSet that follows all CSV parsing rules in a way similar to the CSV parsing rules used by Excel and various database and report tools that import and export CSVs.
0 Comments
Leave a Reply. |