Read & process CSV files programmaticaly

LOCAL ReadCsvFile() fmode := fmode.Open; fstream := fstream.FileStream(‘c:\temp\test.csv’,fmode); enc := enc.UTF8; // read text as UTF8 charset, can also be Default (Windows) or Ascii reader := reader.StreamReader(fstream,enc); REPEAT Line := reader.ReadLine; //MESSAGE(Line); ColNo := 1; REPEAT CellValue := StringSplit(Line,’;’); Column[ColNo] := CellValue; ColNo += 1; UNTIL Line = ”; // Process columns UNTIL reader.EndOfStream; reader.Close; fstream.Close; //variables : all... Read the full text.
Comment List
Related
Recommended