阅读301 返回首页    go 阿里云 go 技术社区[云栖]


DEV GridControl 导出到Excel

            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();
                gridControl_dz.ExportToXls(fileDialog.FileName);
                DevExpress.XtraEditors.XtraMessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            } 


作者:jiankunking 出处:https://blog.csdn.net/jiankunking

最后更新:2017-04-03 12:55:46

  上一篇:go 'System.Data.DataRow.DataRow(System.Data.DataRowBuilder)' is inaccessible due to its protection leve
  下一篇:go 积累(一)