Blog Of Sem: Devexpress gridview export to excel with savefiledialog

Devexpress gridview export to excel with savefiledialog

         
            string filename;
            saveFileDialog1.Filter = "xlsx files (*.xlsx)|*.xlsx";
            saveFileDialog1.FilterIndex = 2;
            saveFileDialog1.RestoreDirectory = true;
            saveFileDialog1.ShowDialog();
            filename = saveFileDialog1.FileName;
            if (filename == "") filename = "";
            else
            {
                gridView1.ExportToXlsx(filename);
                System.Diagnostics.Process.Start(filename);
            }