Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TNewGrafForm.btnCSVExportClick(Sender: TObject);
- var
- lSaveDialog: tsavedialog; // Save dialog variable
- begin
- lSaveDialog := TSaveDialog.Create(self);
- try
- lSaveDialog.Title := 'Save your text to CSV';
- lSaveDialog.InitialDir := GetCurrentDir;
- lSaveDialog.Filter := 'CSV|.csv';
- lSaveDialog.DefaultExt := 'csv';
- lSaveDialog.FilterIndex := 1;
- if lSaveDialog.Execute then
- begin
- GrafyStatistika.Delimiter := ';';
- GrafyStatistika.QuoteEmptyCells := True;
- GrafyStatistika.SaveToFile(lSaveDialog.FileName);
- end;
- finally
- lSaveDialog.Free;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement