迷一样的逍遥人
晴带雨伞,包带干粮,点滴积累,水到渠成.

 

private void simpleButton1_Click(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, options);
DevExpress.XtraEditors.XtraMessageBox.Show("保存成功!""提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
posted on 2018-03-07 15:05  谜一样的逍遥人  阅读(443)  评论(0编辑  收藏  举报