SaveFileDialog fileDialog = new SaveFileDialog();
            fileDialog.Title = "导出Excel";
            fileDialog.Filter = "Excel文件(*.xls)|*.xls";
            DialogResult dialogResult = fileDialog.ShowDialog(this);
            if (dialogResult == DialogResult.OK)
            {
                DevExpress.XtraPrinting.XlsExportOptions options = new 
DevExpress.XtraPrinting.XlsExportOptions();
                gridControl1.ExportToXls(fileDialog.FileName);
                DevExpress.XtraEditors.XtraMessageBox.Show("保存成功!", "提示",         
                MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

  

相关文章:

  • 2021-09-28
  • 2022-02-05
  • 2021-11-01
  • 2021-10-10
  • 2021-08-24
  • 2021-06-23
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案