美文网首页
GridControl导出Excel数据

GridControl导出Excel数据

作者: 唐九十九藏 | 来源:发表于2018-09-03 11:36 被阅读0次

SaveFileDialog saveFileDialog1 = new SaveFileDialog();

saveFileDialog1.Filter = "xls files (*.xls)|*.xls|All files (*.*)|*.*";

if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) {

DevExpress.XtraPrinting.XlsExportOptions op = new DevExpress.XtraPrinting.XlsExportOptions();

op.ShowGridLines = true;

this.gvSaleOrder.ExportToXls(saveFileDialog1.FileName, op);

}

相关文章

网友评论

      本文标题:GridControl导出Excel数据

      本文链接:https://www.haomeiwen.com/subject/fnsufftx.html