private void btnBaoCao_Click(object sender, EventArgs e) { GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.dgvEmployee); SpreadExportRenderer exportRenderer = new SpreadExportRenderer(); spreadExporter.RunExport("D:\\exportedFile.xlsx", exportRenderer); System.Diagnostics.Process.Start("D:\\exportedFile.xlsx"); }
private void ExportData() { GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1); spreadExporter.ExportVisualSettings = true; SpreadExportRenderer exportRenderer = new SpreadExportRenderer(); spreadExporter.RunExport(@"..\..\exported-grid.xlsx", exportRenderer); RadMessageBox.Show("Export completed!"); }
private void NewSpreadExport(string fileName) { SplashForm.ShowForm(this); GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.radGridView1); spreadExporter.ExportVisualSettings = true; spreadExporter.ExportFormat = SpreadExportFormat.Xlsx; spreadExporter.HiddenColumnOption = HiddenOption.DoNotExport; SpreadExportRenderer exportRenderer = new SpreadExportRenderer(); exportRenderer.WorkbookCreated += exportRenderer_WorkbookCreated; spreadExporter.RunExport(fileName, exportRenderer); }
private void btnExportar_Click(object sender, EventArgs e) { GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.dgvPacientes, SpreadExportFormat.Xlsx); SpreadExportRenderer exportRenderer = new SpreadExportRenderer(); var rutaEscritorioWindows = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); try { spreadExporter.RunExport(rutaEscritorioWindows + "\\Listado de Pacientes.xlsx", exportRenderer, "Listado de Pacientes"); MessageBox.Show("Listado de Pacientes.xlsx guardado en el Escritorio", "Reporte", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show(ex.Message, "Reporte", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { var dossExport = new SaveFileDialog() { Filter = "Excel | *.xlsx", FileName = "FinaTech Prod " + radDateTimePicker1.Value.ToString("dd-MM-yyyy"), }; if (dossExport.ShowDialog() == DialogResult.OK) { var doss = dossExport.FileName; var spreadExport = new GridViewSpreadExport(radGridView1); var exportRender = new SpreadExportRenderer(); spreadExport.RunExport(doss, exportRender); } }
private void RdBtnExportExcel_Click(object sender, EventArgs e) { try { SaveFileDialog _SaveFileDialog = new SaveFileDialog() { Title = "A3D Bhav-Copy Analysis Report", Filter = "Excel File(*.xlsx)|*.xlsx", RestoreDirectory = true, AddExtension = true, FileName = "A3D Bhav-Copy Analysis Data " + DateTime.Now.ToString("dd-MMM-yyyy hh-mm-ss tt") }; if (_SaveFileDialog.ShowDialog() == DialogResult.OK) { Cursor = Cursors.WaitCursor; GridViewSpreadExport spreadExporter = new GridViewSpreadExport(this.RdGrdReportResult) { ExportChildRowsGrouped = true, ExportViewDefinition = true, ExportVisualSettings = true, FileExportMode = FileExportMode.CreateOrOverrideFile }; SpreadExportRenderer exportRenderer = new SpreadExportRenderer(); spreadExporter.RunExport(_SaveFileDialog.FileName, exportRenderer); StrExcelFileName = _SaveFileDialog.FileName; Cursor = Cursors.Default; if (ClsMessage._IClsMessage.showQuestionMessage("Excel Export Completed." + Environment.NewLine + "Do You Want To Open File?") == DialogResult.Yes) { System.Diagnostics.Process.Start(StrExcelFileName); } } } catch (Exception ex) { ClsMessage._IClsMessage.ProjectExceptionMessage(ex); } }