Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
saveFileDialog.Filter = "csv File (.csv)|*.csv";
bool? useClick = saveFileDialog.ShowDialog();
if (useClick == true)
{
var stream = saveFileDialog.OpenFile();
gcSpreadSheet1.Sheets[0].SaveCsv(stream, GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None);
//gcSpreadSheet1.Sheets[0].SaveCsv(stream, GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None, System.Text.Encoding.UTF8);
//gcSpreadSheet1.Sheets[0].SaveCsv(0,0,5,5,stream,GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None);
//gcSpreadSheet1.Sheets[0].SaveCsv(0,0,5,5,stream, GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None, System.Text.Encoding.UTF8);
//gcSpreadSheet1.SaveCSV(0, stream, GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None);
//gcSpreadSheet1.SaveCSV(0, stream, GrapeCity.Windows.SpreadSheet.Data.TextFileSaveFlags.None, System.Text.Encoding.UTF8);
stream.Dispose();
}