Bonjour , j'ai le même problème mais en winform c'est un peux different , j'ai un code qui quand on clique sur le bouton il crée directement un fichier .xls (excel) et l'enregistre dans l'emplacement spécifié dans le code , par contre moi je cherche à afficher une boite de dialogue "enregistrer-sous" . voila mon code :
Merci de m'aider svp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 private void button2_Click(object sender, System.EventArgs e) { #region // lblMessage.Visible = true; // lblMessage.Text = ""; // Export all the details try { // Get the datatable to export DataTable dt = dsSelectionListeDiffere.Tables[0].Copy(); dsSelectionListeDiffere = FrmFonctionPrincipale.getListeDifferesParClient(1); // Export all the details to Excel RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Win"); objExport.ExportDetails(dt, Export.ExportFormat.Excel, "C:\\EmployeesInfo.xls"); MessageBox.Show("Exporté Avec Succès dans C:\\EmployeesInfo.xls"); } catch(Exception Ex) { MessageBox.Show(Ex.Message); // lblMessage.Text = Ex.Message; } #endregion }![]()
Partager