Autor Beitrag
HBriele
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80



BeitragVerfasst: Di 01.02.05 21:06 
:?:
Hi,
trotz Delimiter und QuoteChar Komma und Hochkomma in der Ausgabedatei.

Wer weis Rat !

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  F := TStringList.Create;
   F.Delimiter := ';';
   F.QuoteChar := '|';
  try
    F.Add(IntToStr(StringGrid1.RowCount));
    F.Add(IntToStr(StringGrid1.ColCount));
   for i := 0 to (StringGrid1.RowCount - 1) do
      F.Add(StringGrid1.Rows[i].DelimitedText);
    F.SaveToFile(datei);
  finally
    F.Free;


Gruß
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 01.02.05 21:30 
Moin!

Das liegt daran, dass du die Trennzeichen der "falschen" Stringliste setzt. :wink:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
  F := TStringList.Create;  
  try  
     F.Add(IntToStr(StringGrid1.RowCount));  
     F.Add(IntToStr(StringGrid1.ColCount));  
   for i := 0 to (StringGrid1.RowCount - 1) do begin
     StringGrid1.Rows[i].Delimiter := ';';
     StringGrid1.Rows[i].QuoteChar := '|';

     F.Add(StringGrid1.Rows[i].DelimitedText);  
  end;
    F.SaveToFile(datei);  
  finally  
    F.Free;

Das sollte es eigentlich tun (ungetestet).

cu
Narses
HBriele Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 80



BeitragVerfasst: Di 01.02.05 21:50 
Danke!

Funktioniert!!