// GridControl 数据导出对应的格式 DevExpress.XtraGrid.Views.Grid.GridView view = gridControl1.MainView as DevExpress.XtraGrid.Views.Grid.GridView; if (view != null) { try { view.ExportToPdf("MainViewData1.pdf"); //view.ExportToHtml("a.html"); // view.ExportToXls("b.xls"); Process.Start("MainViewData1.pdf"); // Process.Start("b.xls"); } catch (Exception ) { MessageBox.Show("请先关闭pdf阅读器"); } // Process.Start("MainViewData.pdf"); // Process process = new Process(); // process.StartInfo.FileName = "AcroRd32.exe"; // process.StartInfo.Arguments = "/MainViewData.pdf"; // Process.Start("MainViewData.pdf"); // Process.Start("b.xls");