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

 

以上是导出excel文件的.想导出其它的,

 

可直接 gridControl2.ExportToPDF了,html,好多了,集也好了,可自行选择/

相关文章:

  • 2022-12-23
  • 2022-02-15
  • 2021-12-12
  • 2021-08-30
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-01-09
  • 2022-02-12
相关资源
相似解决方案