Problem Export with TSeriesDataText and NULL Values
Posted: Mon Feb 24, 2014 8:45 am
Hello
I'm exporting my data withe the method of TSeriesDataText. Follow my code:
PROCEDURE TfrmVis_Grafik.btnExportClick(Sender : TObject);
VAR
i : Integer;
SDT:TSeriesDataText;
BEGIN
IF (cbGrafik.Text <> '') THEN BEGIN
SaveDialog.FileName := CM.ExtractWord(1, cbGrafik.Text, [';'])+' '+FormatDateTime('yyyymmddhhnnss', Now);
IF SaveDialog.Execute THEN BEGIN
FOR i := 0 TO Chart .SeriesCount-1 DO BEGIN
IF Chart IS TLineSeries THEN BEGIN
Chart.Title := Titel[i+1];
END;
END;
Series11.ParentChart := NIL;
TRY
SDT:=TSeriesDataText.Create(Chart, NIL);
SDT.TextDelimiter := ';';
SDT.IncludeHeader := True;
SDT.SaveToFile(SaveDialog.FileName);
FINALLY
FreeAndNIL(SDT);
END;
Series11.ParentChart := Chart;
END;
END ELSE BEGIN
MessageDlg(SNoGraphicProfile, mtError, [mbOK], 0);
END;
END;
Everything are ok, but in my datas are some Values with "NULL" not "0"!! The Line are interrupted (see Snap4.jpg) correctly, but when i export the Lineseries, the "NULL" value are exportet with "0" (see Snap5.jpg), but i need a "blank" cell!!
May somebody can give me a hint, to solve my problem
Regards
Gregor
I'm exporting my data withe the method of TSeriesDataText. Follow my code:
PROCEDURE TfrmVis_Grafik.btnExportClick(Sender : TObject);
VAR
i : Integer;
SDT:TSeriesDataText;
BEGIN
IF (cbGrafik.Text <> '') THEN BEGIN
SaveDialog.FileName := CM.ExtractWord(1, cbGrafik.Text, [';'])+' '+FormatDateTime('yyyymmddhhnnss', Now);
IF SaveDialog.Execute THEN BEGIN
FOR i := 0 TO Chart .SeriesCount-1 DO BEGIN
IF Chart IS TLineSeries THEN BEGIN
Chart.Title := Titel[i+1];
END;
END;
Series11.ParentChart := NIL;
TRY
SDT:=TSeriesDataText.Create(Chart, NIL);
SDT.TextDelimiter := ';';
SDT.IncludeHeader := True;
SDT.SaveToFile(SaveDialog.FileName);
FINALLY
FreeAndNIL(SDT);
END;
Series11.ParentChart := Chart;
END;
END ELSE BEGIN
MessageDlg(SNoGraphicProfile, mtError, [mbOK], 0);
END;
END;
Everything are ok, but in my datas are some Values with "NULL" not "0"!! The Line are interrupted (see Snap4.jpg) correctly, but when i export the Lineseries, the "NULL" value are exportet with "0" (see Snap5.jpg), but i need a "blank" cell!!
May somebody can give me a hint, to solve my problem
Regards
Gregor