..........
//把数据写入到List
StringsList := TList.Create;
for Idx := 0 to Pred(Memo.Lines.Count) do
begin
if Pos(',', Memo.Lines[Idx]) > 0 then //去掉空行
begin
Strings := TStringList.Create;
Strings.Delimiter := ',';
Strings.DelimitedText := Memo.Lines[Idx];
StringsList.Add(Pointer(Strings));
end;
end;
//把数据写入到List
StringsList := TList.Create;
for Idx := 0 to Pred(Memo.Lines.Count) do
begin
Strings := TStringList.Create;
Strings.Delimiter := ',';
Strings.DelimitedText := Memo.Lines[Idx];
if Strings.Count = 5 then //只处理含5列的行
StringsList.Add(Pointer(Strings));
end;