private void ExportExcel_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.SaveFileDialog saveFile = new Microsoft.Win32.SaveFileDialog(); saveFile.DefaultExt = ".xlsx"; saveFile.Filter = "Excel file (.xlsx)|*.xlsx"; if (saveFile.ShowDialog() == true) { using (new WaitCursor()) { _exExcel.CreateNewExcel(saveFile.FileName); } MessageBox.Show("The configuration has been successfully exported!"); } }