Read and modify existing CSV files: with TCsv.Create do try LoadAnsiFile(‘c:\data.csv’); ShowMessage(ToString); if (LineCount > 1) and (FieldCount[1] > 2) then Fields[1, 2] := ‘New value’; ShowMessage(ToString); finally Free; end; Create new CSV files: with TCsv.Create do try LineCount := 10; for i := 0 to LineCount – 1 do begin FieldCount := 3; for […]
↧