示例#1
0
        private void userButton3_Click(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView View = gridControl1.MainView as DevExpress.XtraGrid.Views.Grid.GridView;

            if (View != null)
            {
                View.ExportToCsv("ShowData.CSV");//pdf的文件名必须是英文
            }
            try
            {
                Process pdfExport = new Process();

                pdfExport.StartInfo.FileName = @"C:\Users\liujiao\AppData\Local\Kingsoft\WPS Office\ksolaunch.exe";

                pdfExport.StartInfo.Arguments = "ShowData.csv";

                pdfExport.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }