閱讀834 返回首頁    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);
            } 

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

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