private void ExportCsv() { #region radspreadsheet-model-import-export-csvformatprovider-wpf_1 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); string fileName = "SampleFile.csv"; IWorkbookFormatProvider formatProvider = new CsvFormatProvider(); using (FileStream output = new FileStream(fileName, FileMode.Create)) { formatProvider.Export(workbook, output); } #endregion }
private void SaveFile_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); CsvFormatProvider formatProvider = new CsvFormatProvider(); sfd.Filter = "CSV (comma delimited) (*.csv)|*.csv|All Files (*.*)|*.*"; if (sfd.ShowDialog() == true) { using (Stream output = sfd.OpenFile()) { formatProvider.Export(this.radSpreadsheet.Workbook, output); } } }
public void ExportWorkbookToCsvWPF() { #region radspreadprocessing-working-with-workbooks-create-open-and-save-workbooks_3 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); string fileName = "SampleFile.csv"; IWorkbookFormatProvider formatProvider = new CsvFormatProvider(); using (FileStream output = new FileStream(fileName, FileMode.Create)) { formatProvider.Export(workbook, output); } #endregion }
private void ExportCsv() { #region radspreadprocessing-formats-and-conversion-csv-csvformatprovider_1 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); string fileName = "SampleFile.csv"; IWorkbookFormatProvider formatProvider = new CsvFormatProvider(); using (FileStream output = new FileStream(fileName, FileMode.Create)) { formatProvider.Export(workbook, output); } #endregion }
public void ExportWorkbookToCsvSL() { #region radspreadprocessing-working-with-workbooks-create-open-and-save-workbooks_2 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); SaveFileDialog saveFileDialog = new SaveFileDialog(); CsvFormatProvider formatProvider = new CsvFormatProvider(); saveFileDialog.Filter = "CSV (comma delimited) (*.csv)|*.csv|All Files (*.*)|*.*"; if (saveFileDialog.ShowDialog() == true) { using (Stream output = saveFileDialog.OpenFile()) { formatProvider.Export(workbook, output); } } #endregion }
public void ExportWorkbookToCsv() { #region radspreadsheet-model-import-export-csvformatprovider-silverlight_2 Workbook workbook = new Workbook(); workbook.Worksheets.Add(); SaveFileDialog saveFileDialog = new SaveFileDialog(); CsvFormatProvider formatProvider = new CsvFormatProvider(); saveFileDialog.Filter = "CSV (comma delimited) (*.csv)|*.csv|All Files (*.*)|*.*"; if (saveFileDialog.ShowDialog() == true) { using (Stream output = saveFileDialog.OpenFile()) { formatProvider.Export(workbook, output); } } #endregion }