GridControl导出Excel数据
2018-09-03 本文已影响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);
}