private void ExportExcel_Button_Click(object sender, EventArgs e) { SaveFileDialog openFileDialog = new SaveFileDialog { Filter = "Excel file(*.xlsx)|*.xlsx" }; string path = ""; if (openFileDialog.ShowDialog() == DialogResult.OK) { path = openFileDialog.FileName; } try { Main_GridControl.ExportToXlsx(path); System.Diagnostics.Process.Start(path); } catch (Exception ex) { BSLog.Logger.Warn(ex.Message); MessageBoxHelper.ShowErrorMessage($"Xuất excel thất bại!\r\n{ex.Message}"); } }
private void ExportExcel_Button_Click(object sender, EventArgs e) { Main_GridControl.ExportExcelByName(ReportTemplate.GetTemplate(ReportTemplate.RPT006)); }
private void ExportExcel_Button_Click(object sender, EventArgs e) { Main_GridControl.ExportExcel(ExcelTemplate.EXL000012); }